Add pass to replace input dim order clones with permutations.#21241
Add pass to replace input dim order clones with permutations.#21241MartinPavella wants to merge 2 commits into
Conversation
The pass preserves the dim order of the inputs, but internally the graph will use only the contiguous dim order.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21241
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit e0c600c with merge base ad52be9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This PR needs a
|
|
@MartinPavella if we're going to go all the way to removing executorch/backends/cadence/aot/compiler.py Line 298 in 3389d51 Related to this, that's one of the problems that I believe our fused-quant proposal would address. Hopefully we can discuss next week! |
@mcremon-meta thanks for the suggestion. In this PR our goal is to have a model that consumes channels last input data, which is then permuted to channels first by the However, your suggestion might be applicable to another one of my PRs (#21057). In that one, our goal is to remove non-contiguous dim order from the model except for the inputs (so not quite what |
|
My only concern is that requiring As a heads up I go on leave from Monday for three weeks so I won't be available for more reviews during that time. |
Support for |
Summary
This pass replaces
dim_order_cloneandto_dim_order_copynodes that consume model inputs by a sequence of permute nodes according to the proposal in #19299.Fixes #20095.
Note: The PR is build on top of #21057 for testing purposes. This will be cleaned up before merge, so only the last commit is relevant for review.
Test plan
pytest backends/transforms/test/test_replace_channels_last_input_clones.py