Channels last: optimize structural layout regions - #21962
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21962
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 9 Unrelated FailuresAs of commit 88da265 with merge base 8b93850 ( NEW FAILURE - The following job has 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
|
|
What is the reason for extending this pass rather than generalizing the PropagateViewCopyPermuteUp/Down passes from the arm backend? The biggest issue which introduced unnecessary permutes in the arm backend before the refactor was view operators which forced channels-first format, and I don't see that solved by this pass. Also, is it necessary to distinguish between layout introduced ops and existing ones? |
Introduce common structural layout-copy helpers and teach the shared transpose
and permute transforms to preserve layout provenance only when every
contributing copy is layout-owned.
Add opt-in layout-region boundary propagation with backend barriers, rank and
broadcast validation, constant remapping, alias handling, symbolic-shape
support, and copy-volume safety. Per-channel QDQ remains a barrier because its
axis is dimension-dependent.
Read the whole of remove_permutes_around_elementwise_ops.py rather than the
diff: the boundary machinery is easier to follow as a unit than as a patch
against the pre-existing subgraph walk.
Local Corstone-300 run of the full Cortex-M suite (670 passed, 4 skipped, 45
xfailed, 4 xpassed), the transforms suites, and lintrunner.
Authored with Codex.