Remove pass-local ExportPass replays (#22091) - #22091
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22091
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit f813415 with merge base 368a849 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
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 D115472301. |
This PR needs a
|
Summary: Remove full-graph `ExportPass` replay from four Tier 1 pass-local transformations. `BindOptionalArgsPass` and `RemoveBranchedQuantDequant` now update existing nodes in place, `ReplaceEmptyTensorsWithFullPass` copies metadata to its equivalent replacement node and recompiles modified nested modules, and `CombinePermuteWithMatmul` recomputes fake tensors only across its affected frontier. The shared cascaded-permute transform exposes an in-place entry point so Helios retains immediate cleanup without reconstructing the graph. These changes preserve graph, unaffected-node, and metadata identity while keeping no-op `modified=False` behavior. Each modifying invocation avoids one full replay; `CombinePermuteWithMatmul` can avoid two when its follow-up fusion also modifies the graph. Based on existing replay measurements, each avoided replay saves approximately 4-8 ms for 10 nodes, 40-75 ms for 100 nodes, and 0.4-0.75 s for 1,000 nodes. Already-normalized no-op invocations are unchanged. Reviewed By: aliafzal, ethansfng Differential Revision: D115472301
9f6ce1b to
a064788
Compare
Summary: Remove full-graph `ExportPass` replay from four Tier 1 pass-local transformations. `BindOptionalArgsPass` and `RemoveBranchedQuantDequant` now update existing nodes in place, `ReplaceEmptyTensorsWithFullPass` copies metadata to its equivalent replacement node and recompiles modified nested modules, and `CombinePermuteWithMatmul` recomputes fake tensors only across its affected frontier. The shared cascaded-permute transform exposes an in-place entry point so Helios retains immediate cleanup without reconstructing the graph. These changes preserve graph, unaffected-node, and metadata identity while keeping no-op `modified=False` behavior. Each modifying invocation avoids one full replay; `CombinePermuteWithMatmul` can avoid two when its follow-up fusion also modifies the graph. Based on existing replay measurements, each avoided replay saves approximately 4-8 ms for 10 nodes, 40-75 ms for 100 nodes, and 0.4-0.75 s for 1,000 nodes. Already-normalized no-op invocations are unchanged. Reviewed By: aliafzal, ethansfng Differential Revision: D115472301
a064788 to
f813415
Compare
Summary:
Remove full-graph
ExportPassreplay from four Tier 1 pass-local transformations.BindOptionalArgsPassandRemoveBranchedQuantDequantnow update existing nodes in place,ReplaceEmptyTensorsWithFullPasscopies metadata to its equivalent replacement node and recompiles modified nested modules, andCombinePermuteWithMatmulrecomputes fake tensors only across its affected frontier. The shared cascaded-permute transform exposes an in-place entry point so Helios retains immediate cleanup without reconstructing the graph.These changes preserve graph, unaffected-node, and metadata identity while keeping no-op
modified=Falsebehavior. Each modifying invocation avoids one full replay;CombinePermuteWithMatmulcan avoid two when its follow-up fusion also modifies the graph. Based on existing replay measurements, each avoided replay saves approximately 4-8 ms for 10 nodes, 40-75 ms for 100 nodes, and 0.4-0.75 s for 1,000 nodes. Already-normalized no-op invocations are unchanged.Reviewed By: aliafzal, ethansfng
Differential Revision: D115472301