Arm backend: Support sampler-backed VGF grid_sample for RIFE#20329
Merged
bdemirb merged 4 commits intoJun 17, 2026
Merged
Conversation
Enable the VGF grid_sampler custom payload to select an image sampler shader for NCHW float32 C4 inputs, while keeping the existing storage-buffer shader for unsupported layouts. Pad static C3 inputs to C4 in the rewrite pass so RIFE feature warps can use texture samplers, then slice outputs back to C3. Add shader resources and tests covering sampler and fallback paths. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I8737436d2b5920e74804103dae2a609ce2d24183
Allow VgfPipeline callers to set the expected number of executorch_call_delegate nodes while keeping the default at one. This is a test-framework-only change for multi-delegate VGF tests. It does not affect Arm backend lowering or runtime behavior. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: Iac60bb75bd40cab424ccb9841a2d02ee3767f11c
Add an int8 sampler shader payload for quantized grid_sample boundaries using fixed SNORM-compatible qparams. Annotate grid_sampler in the Arm quantizer with the same fixed int8 image qparams so PT2E places the expected Q/DQ boundary before the VGF custom-op rewrite. The rewrite pass consumes that quantized boundary when selecting the int8 image payload, avoiding a float image payload and the extra runtime Q/DQ around the custom shader. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I7c85dde518f871a7572386ca6cfe67e865ee6745
Add sampler shader variants for grid_sample with align_corners=True. Select the aligned sampler shader from the VGF custom payload when the operator requests align_corners=True, while keeping bicubic on the storage-buffer fallback path. Allow C3 inputs to use the sampler padding path for both align modes so RIFE warps can use the int8 SNORM sampler payload without changing the model's grid_sample semantics. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I83f8cdb8024d3d77c8706278c9b12c9dbe77b58f
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20329
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 44 PendingAs of commit 1d9b2c9 with merge base 551e90e ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Collaborator
Author
|
@pytorchbot label "partner: arm" |
Collaborator
Author
|
@pytorchbot label "release notes: arm" |
Collaborator
Author
|
@claude review this PR |
|
Claude encountered an error after 3m 51s —— View job I'll analyze this and get back to you. |
zingo
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add VGF
grid_samplecustom-shader improvements needed by the RIFE optical-flow workload.This stack enables sampler-backed
grid_samplepayloads where supported, adds support for quantised int8/SNORM image payloads, handlesalign_corners=True, and updates VGF test infrastructure so multi-delegate exports can be validated.Changes
grid_sample.grid_sample.align_corners=Truesampler shader variants.cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani