XNNPack: Extend to_copy support when skip_dim_order=True - #22075
XNNPack: Extend to_copy support when skip_dim_order=True#22075Erik-Lundell wants to merge 2 commits into
Conversation
With the default XNNPACK test config, skip_dim_order=False rewrites aten._to_copy.default to dim_order_ops._to_dim_order_copy.default path is already supported through CloneDimOrderConfig. Add a ToCopy partitioner config to partition the operator. _to_copy already had a node_visitor due to DimOrderOpsRevertPass creating _to_copy nodes for permutation. Expand this to also support dtype conversion using to_copy. Extend RemoveRedundantCopy pass to handle to_copy nodes with redundant dtypes. Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I22a06ba2079aeb4bbd6bb53b1086a4b857b7bf76
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22075
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8f684de with merge base d7c5dd4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
a6cd216 to
8f684de
Compare
- Rely on meta from ChannelsLastTaggedReshapePass for data layout. - Fix test for sort_decomposed_operations. Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I47b26202a6b24aa08e6b699522887e52438ef580
|
@claude please review |
|
Claude finished @JakeStevens's task in 7m 42s —— View job Code Review
Nice work — the decomposition into 1.
|
With the default XNNPACK test config, skip_dim_order=False rewrites aten._to_copy.default to dim_order_ops._to_dim_order_copy.default path is already supported through CloneDimOrderConfig.
Add a ToCopy partitioner config to partition the operator. _to_copy already had a node_visitor due to DimOrderOpsRevertPass creating _to_copy nodes for permutation. Expand this to also support dtype conversion using to_copy.
Extend RemoveRedundantCopy pass to handle to_copy
nodes with redundant dtypes.
cc @GregoryComer @digantdesai @cbilgin @JakeStevens @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani