Arm backend: Lower grid_sampler_2d to VGF TOSA CUSTOM#19547
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19547
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 2 Unrelated Failures, 2 Unclassified FailuresAs of commit be760f4 with merge base c5da8fb ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following jobs 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. |
|
@pytorchbot label "partner: arm" |
|
@pytorchbot label "release notes: arm" |
|
Hi @digantdesai this one is probably good to tests internally at Meta :) |
|
@digantdesai has imported this pull request. If you are a Meta employee, you can view this in D105009413. |
271a05b to
1020f0f
Compare
|
Hi @digantdesai did the internal testing work? This also need a re-import after a small update. |
|
Can you please rebase? |
288e48f to
b0c25a2
Compare
|
There were some changes in the CLA, I guess from the Foundation move, can you try it again? |
This patch builds on the preceding Arm TOSA custom-op infrastructure changes in Gerrit changes 1222279, 1222280, and 1222278. On top of that base, it adds the first concrete use case for grid_sampler_2d by preserving aten.grid_sampler_2d through partitioning and rewriting it in the Arm lowering pipeline to tosa.CUSTOM instead of decomposing it into a large standard TOSA subgraph. The lowering attaches CustomAttribute metadata carrying a placeholder shader payload in implementation_attrs, adjusts the fake tosa.CUSTOM op to behave as a single-output tensor op so it composes correctly with the existing Arm TOSA pipeline, and adds a focused regression test showing that a torch.nn.functional.grid_sample model lowers successfully and produces exactly one CUSTOM op in the serialized TOSA graph. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I183afd344715e38f613db89ad8945060df7f2f1f
Refactor the grid_sampler_2d TOSA CUSTOM payload into a helper module so the custom shader contract, constants, and validation logic live in one place. Emit the ML SDK Vulkan custom-shader attribute format, including the converter-recognized domain, entry point, workgroup sizes, shader language/code, tensor storage-buffer bindings, descriptor sets, and Vulkan format metadata. Add focused tests for payload round-trip behavior and for the grid_sampler_2d rewrite pass. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I8f13f91b97e86b3b32bf2c25479684bc09faeddc
Add a VGF export/integration test for grid_sampler using the existing VgfPipeline. The test is gated on model-converter availability and runs with quantization disabled and Vulkan runtime execution disabled, so it validates the converter/export handoff without depending on runtime shader dispatch. Also register grid_sampler as a recognized custom edge op for the Arm test-name validator. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: I495d4283b09de7dedebce5d2f24b240e79d37dfc
Change-Id: Iae92c23da049949f5f1d0719922d84581893d4f7
b0c25a2 to
52830fe
Compare
…h#19547 Signed-off-by: Rob Elliott <Robert.Elliott@arm.com> Change-Id: Ic30ddbbdbf0a08d724d2dde9d2f6432918091932 Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
digantdesai
left a comment
There was a problem hiding this comment.
Thanks, and apologies for the lag.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani --------- Signed-off-by: Baris Demir <baris.demir@arm.com>
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani