Skip to content

Arm backend: Rewrite cat->slice patterns - #22868

Merged
oscarandersson8218 merged 3 commits into
pytorch:mainfrom
oscarandersson8218:rewrite_cat_slices
Sep 17, 2026
Merged

oscarandersson8218 merged 3 commits into
pytorch:mainfrom
oscarandersson8218:rewrite_cat_slices

Conversation

@oscarandersson8218

@oscarandersson8218 oscarandersson8218 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Add RewriteCatSlicePass to rewrite static unit-stride slices along a concat dimension in terms of their overlapping original inputs.

Only rewrite complete groups of slice users when the replacement does not increase the operation count. Preserve qparams for cat's tensor-list input and void materializing no-op slices for complete inputs.

This avoids materializing an intermediate concat when only part of its result is needed.

cc @digantdesai @freddan80 @per @zingo @mansnils @Sebastian-Larsson @robell @rascani

Add RewriteCatSlicePass to rewrite static unit-stride slices along a
concat dimension in terms of their overlapping original inputs.

Only rewrite complete groups of slice users when the replacement does
not increase the operation count. Preserve qparams for cat's tensor-list
input and void materializing no-op slices for complete inputs.

This avoids materializing an intermediate concat when only part of its
result is needed.

Change-Id: I93b2f987948ff715063e3dcfdf6d8efd501434f9
Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
@pytorch-bot

pytorch-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22868

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Unrelated Failure, 1 Unclassified Failure

As of commit aa004e1 with merge base 9e84b61 (image):

NEW FAILURE - The following job has failed:

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 16, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Sep 16, 2026
@oscarandersson8218 oscarandersson8218 added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate release notes: none Do not include this in the release notes and removed release notes: arm Changes to the ARM backend delegate labels Sep 16, 2026
Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>
Change-Id: Iefce2ef195b47b3b7aeb7c01e87f2b8789d8c943
@oscarandersson8218
oscarandersson8218 merged commit 614a6bc into pytorch:main Sep 17, 2026
423 of 426 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants