Handle rank-changing views in RemovePermutesAroundElementwiseOps (#19538)#19538
Handle rank-changing views in RemovePermutesAroundElementwiseOps (#19538)#19538mcremon-meta wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19538
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: ❌ 3 New Failures, 1 Cancelled Job, 1 Unrelated Failure, 1 Unclassified FailureAs of commit f4dd109 with merge base 35d48e6 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
CANCELLED JOB - The following job was cancelled. Please retry:
BROKEN TRUNK - The following job 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. |
|
@mcremon-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104775244. |
This PR needs a
|
981fc88 to
b7787d6
Compare
) Summary: Extend RemovePermutesAroundElementwiseOps to cancel permute pairs across rank-changing squeeze/unsqueeze view boundaries. When a permute's sole user is a view_copy that adds or removes a single size-1 dimension, the pass adapts the expected permutation to the new rank and continues traversal. This enables removing permutes that sit on opposite sides of an unsqueeze→elementwise→squeeze chain (e.g. the NHWC↔NTC layout conversion around convolutions in the cascade detector model). Key changes: - Accept extra_permutable_ops constructor parameter for backend-specific ops - Track per-node expected permutations across view boundaries - Run dimension updates before edges_in bypass to preserve original metadata - Handle view_copy, unsqueeze_copy, squeeze_copy rank changes - Treat aten.full.default as a compile-time constant Note: The PostponePermuteOpBelowSqueezeOrUnsqueezeLikeView pass is removed from the Arm pass manager, since it doesn't actually help anymore. Reviewed By: DrJessop Differential Revision: D104775244
b7787d6 to
fc7560f
Compare
) Summary: Extend RemovePermutesAroundElementwiseOps to cancel permute pairs across rank-changing squeeze/unsqueeze view boundaries. When a permute's sole user is a view_copy that adds or removes a single size-1 dimension, the pass adapts the expected permutation to the new rank and continues traversal. This enables removing permutes that sit on opposite sides of an unsqueeze→elementwise→squeeze chain (e.g. the NHWC↔NTC layout conversion around convolutions in the cascade detector model). Key changes: - Accept extra_permutable_ops constructor parameter for backend-specific ops - Track per-node expected permutations across view boundaries - Run dimension updates before edges_in bypass to preserve original metadata - Handle view_copy, unsqueeze_copy, squeeze_copy rank changes - Treat aten.full.default as a compile-time constant Note: The PostponePermuteOpBelowSqueezeOrUnsqueezeLikeView pass is removed from the Arm pass manager, since it doesn't actually help anymore. Reviewed By: DrJessop Differential Revision: D104775244
fc7560f to
f4dd109
Compare
Summary:
Extend RemovePermutesAroundElementwiseOps to cancel permute pairs across rank-changing squeeze/unsqueeze view boundaries. When a permute's sole user is a view_copy that adds or removes a single size-1 dimension, the pass adapts the expected permutation to the new rank and continues traversal. This enables removing permutes that sit on opposite sides of an unsqueeze→elementwise→squeeze chain (e.g. the NHWC↔NTC layout conversion around convolutions in the cascade detector model).
Key changes:
Note: The PostponePermuteOpBelowSqueezeOrUnsqueezeLikeView pass is removed from the Arm pass manager, since it doesn't actually help anymore.
Reviewed By: DrJessop
Differential Revision: D104775244