Skip to content

Arm backend: Normalize grid-sampler custom inputs to NHWC#20965

Open
robell wants to merge 1 commit into
gh/robell/arm-grid-stack/05-snorm-rgbafrom
gh/robell/arm-grid-stack/06-nhwc
Open

Arm backend: Normalize grid-sampler custom inputs to NHWC#20965
robell wants to merge 1 commit into
gh/robell/arm-grid-stack/05-snorm-rgbafrom
gh/robell/arm-grid-stack/06-nhwc

Conversation

@robell

@robell robell commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Arm backend: Normalize grid-sampler custom inputs to NHWC
This fixes a bug on input tensor order vs shader expectations.

Ensure VGF grid_sample custom inputs are in the layout expected by the
shader interface. The rewrite now permutes the sampled tensor from NCHW
to NHWC beforectosa.CUSTOM, preserves the grid input as-is, and
permutes the custom result back to NCHW afterward.

This functions well with the newer tensor ordering rules in the Arm backend.

Change-Id: Iccd829964e1142803ddb771ad5c3f405136d0d55
Signed-off-by: Rob Elliott Robert.Elliott@arm.com

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

This fixes a bug on input tensor order vs shader expectations.

Ensure VGF grid_sample custom inputs are in  the layout expected by the
shader interface. The rewrite now permutes the sampled tensor from NCHW
to NHWC beforectosa.CUSTOM, preserves the grid input as-is, and
permutes the custom result back to NCHW afterward.

Change-Id: Iccd829964e1142803ddb771ad5c3f405136d0d55
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
@robell robell requested a review from digantdesai as a code owner July 15, 2026 15:46
@pytorch-bot

pytorch-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 80c5012 with merge base a6aaeff (image):

NEW FAILURE - The following job has failed:

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

@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jul 15, 2026
@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 Jul 15, 2026
@robell robell added the release notes: none Do not include this in the release notes label Jul 16, 2026
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 release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant