Add initial permute-view fusing test-suite.#20415
Conversation
Initial work on pytorch#20097, using the tests from the transpose count suite in the arm backend. All modules are exported and to_edge_transform_and_lowered with a single mock-pass which is intended to run the full pipeline for converting a graph to contiguous channels last format and fusing any additional permutes. The number of permutes and views are counted before and after the pipeline to track any change in the models. Other backends are encouraged to add their own test of interest to ensure that changes to the in-common passes will not regress individual backends. Additionally a number of full model tests will be added. Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: I0c4cc5ba72036e539ab640ddaed2c63b145874cf
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20415
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: ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 01c3c9b with merge base 0da9ca3 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs 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. |
There was a problem hiding this comment.
Pull request overview
Adds an initial (currently skipped) test suite under backends/transforms/test/ intended to track permute/view operator counts before/after running an edge transform/lower pipeline, and to verify numerical equivalence across a set of representative modules/models.
Changes:
- Introduces a catalog of test modules and “case” definitions covering conv/linear/attention/RNN/etc. plus channels-last variants.
- Adds a custom
ExportPassthat counts permute- and view-like Edge ops before/after the pass pipeline. - Adds two pytest entrypoints (normal + channels-last), currently marked as proof-of-concept and skipped.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @pytest.mark.skip( | ||
| reason="Proof of concept - currently no permute-view passes implemented." | ||
| ) | ||
| @common.parametrize("case", cases_channels_last, xfail=xfails) |
| class MaxPool2dDilatedModule(torch.nn.Module): | ||
| def __init__(self): | ||
| super().__init__() | ||
| self.pool = torch.nn.MaxPool2d(kernel_size=3, stride=1, padding=1, dilation=2) |
Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: Ibc5f48266d5015c0859be05d8eada92a84a682d5
Initial work on #20097, using the tests from the transpose count suite in the arm backend. All modules are exported and to_edge_transform_and_lowered with a single mock-pass which is intended to run the full pipeline for converting a graph to contiguous channels last format and fusing any additional permutes.
The number of permutes and views are counted before and after the pipeline to track any change in the models.
Other backends are encouraged to add their own test of interest to ensure that changes to the in-common passes will not regress individual backends. Additionally a number of full model tests will be added.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani