Conversation
…pose Summary: Without this change, aten.hardswish.default decomposes into several arithmetic ops (add, clamp, mul, div) which prevents the Vulkan conv2d depthwise fusion pass from recognizing and fusing the activation. Adding hardswish to ops_not_to_decompose keeps it as a single op so the conv2d output tile shader can apply the clamp fusion. Also adds the conv2d_dw_output_tile_3x3_b1x1_clamp shader variant needed for the fused path. Authored with Claude. Test Plan: Exported MobileNetV3 for Vulkan and verified hardswish no longer decomposes. Reviewers: Subscribers: Tasks: Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18575
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 7adc046 with merge base fa81941 ( NEW FAILURES - The following jobs have failed:
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. |
This PR needs a
|
) Summary: Previously, copy.default was unconditionally added to the Vulkan partition as an ephemeral op (assumed to always be a no-op removed by RemoveRedundantOpsTransform). However, copy.default can also represent a dtype cast, and blindly partitioning casts to Vulkan causes runtime failures since the Vulkan backend has no copy implementation. Replace the unconditional registration with a custom are_node_inputs_supported_fn that checks both dtype and shape match between src and dst. Only same-dtype, same-shape copies (true no-ops) are partitioned to Vulkan; dtype casts remain on CPU. Authored with Claude. Test Plan: Exported EfficientNet for Vulkan, which contains copy.default for dtype casts, and confirmed it no longer errors during Vulkan compilation. No-op copies in other models (e.g. MobileNetV3) still partition correctly. Reviewers: Subscribers: Tasks: Tags: --- [ET-VK] Prevent hardswish decomposition by adding to ops_not_to_decompose Summary: Without this change, aten.hardswish.default decomposes into several arithmetic ops (add, clamp, mul, div) which prevents the Vulkan conv2d depthwise fusion pass from recognizing and fusing the activation. Adding hardswish to ops_not_to_decompose keeps it as a single op so the conv2d output tile shader can apply the clamp fusion. Also adds the conv2d_dw_output_tile_3x3_b1x1_clamp shader variant needed for the fused path. Authored with Claude. Test Plan: Exported MobileNetV3 for Vulkan and verified hardswish no longer decomposes. Reviewers: Subscribers: Tasks: Tags: --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/executorch/pull/18576). * __->__ #18576 * #18575 cc @manuelcandales @digantdesai @cbilgin
…orch#18576) Summary: Previously, copy.default was unconditionally added to the Vulkan partition as an ephemeral op (assumed to always be a no-op removed by RemoveRedundantOpsTransform). However, copy.default can also represent a dtype cast, and blindly partitioning casts to Vulkan causes runtime failures since the Vulkan backend has no copy implementation. Replace the unconditional registration with a custom are_node_inputs_supported_fn that checks both dtype and shape match between src and dst. Only same-dtype, same-shape copies (true no-ops) are partitioned to Vulkan; dtype casts remain on CPU. Authored with Claude. Test Plan: Exported EfficientNet for Vulkan, which contains copy.default for dtype casts, and confirmed it no longer errors during Vulkan compilation. No-op copies in other models (e.g. MobileNetV3) still partition correctly. Reviewers: Subscribers: Tasks: Tags: --- [ET-VK] Prevent hardswish decomposition by adding to ops_not_to_decompose Summary: Without this change, aten.hardswish.default decomposes into several arithmetic ops (add, clamp, mul, div) which prevents the Vulkan conv2d depthwise fusion pass from recognizing and fusing the activation. Adding hardswish to ops_not_to_decompose keeps it as a single op so the conv2d output tile shader can apply the clamp fusion. Also adds the conv2d_dw_output_tile_3x3_b1x1_clamp shader variant needed for the fused path. Authored with Claude. Test Plan: Exported MobileNetV3 for Vulkan and verified hardswish no longer decomposes. Reviewers: Subscribers: Tasks: Tags: --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/executorch/pull/18576). * __->__ pytorch#18576 * pytorch#18575 cc @manuelcandales @digantdesai @cbilgin
Summary: Without this change, aten.hardswish.default decomposes into several
arithmetic ops (add, clamp, mul, div) which prevents the Vulkan conv2d
depthwise fusion pass from recognizing and fusing the activation. Adding
hardswish to ops_not_to_decompose keeps it as a single op so the conv2d
output tile shader can apply the clamp fusion.
Also adds the conv2d_dw_output_tile_3x3_b1x1_clamp shader variant needed
for the fused path.
Authored with Claude.
Test Plan: Exported MobileNetV3 for Vulkan and verified hardswish no longer decomposes.
Reviewers:
Subscribers:
Tasks:
Tags:
Stack created with Sapling. Best reviewed with ReviewStack.