Repository navigation
Move backend-neutral Cadence passes to backends/transforms - #24469
mcremon-meta wants to merge 1 commit into
Conversation
Summary: These 23 passes in `backends/cadence/aot` are not Cadence-specific in what they do, so they move to `backends/transforms` where any backend can use them: - Three (`FuseCascadedTransposeOrPermuteOps`, `FuseCascadedViewOps`, `ReplaceNopTransposeOrPermuteWithViewPass`) were already empty subclasses of a `backends/transforms` pass, and stay as they are here. - The other 20 (including `RemoveNopAsStridedCopyOpPass`) move to `backends/transforms`, one module and target each. The ones that listed Cadence's q/dq ops alongside `quantized_decomposed`'s now take those op sets as class attributes holding only the standard ops. Cadence keeps each pass under its old name as a thin subclass that adds its own ops back, so Cadence's behavior is unchanged. - `FuseQuantDequantToRequantizePass` needs a requantize op to fuse a pair whose qparams differ, and there is no backend-neutral one. The shared pass takes a `requantize_op` (default `None`) and defaults to `allow_requantize=False`; Cadence sets its op and keeps `True`. - `permute_pass_utils` gains `get_overload_packet` and `get_placeholders`, and `quantize_reorder_utils` holds the two op sets the reorder passes share. Differential Revision: D129173244
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24469
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 2 Unclassified FailuresAs of commit 50d4ef5 with merge base 9975a72 ( NEW FAILURE - The following job has failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
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 D129173244. |
This PR needs a
|
Summary:
These 23 passes in
backends/cadence/aotare not Cadence-specific in whatthey do, so they move to
backends/transformswhere any backend can use them:FuseCascadedTransposeOrPermuteOps,FuseCascadedViewOps,ReplaceNopTransposeOrPermuteWithViewPass) were already empty subclasses of abackends/transformspass, and stay as they are here.RemoveNopAsStridedCopyOpPass) move tobackends/transforms, one module and target each. The ones that listedCadence's q/dq ops alongside
quantized_decomposed's now take those op sets asclass attributes holding only the standard ops. Cadence keeps each pass under
its old name as a thin subclass that adds its own ops back, so Cadence's
behavior is unchanged.
FuseQuantDequantToRequantizePassneeds a requantize op to fuse a pair whoseqparams differ, and there is no backend-neutral one. The shared pass takes a
requantize_op(defaultNone) and defaults toallow_requantize=False;Cadence sets its op and keeps
True.permute_pass_utilsgainsget_overload_packetandget_placeholders, andquantize_reorder_utilsholds the two op sets the reorder passes share.Differential Revision: D129173244