-
Notifications
You must be signed in to change notification settings - Fork 645
[EXIR] Register _clone_dim_order op and map aten.clone #12971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12971
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: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Left a minor feedback about test coverage!
@@ -389,3 +390,17 @@ def test_mobilenet_v3_xnnpack(self) -> None: | |||
rtol=1e-3, | |||
), | |||
) | |||
|
|||
def test_op_clone_dim_order_registration(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you follow other testcases way (e.g, test_op_dim_order_propagation
), to reuse the memory_format_test_runner function and test at least two different scenarios: one for maintaining dim order, the other is converting the dim order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can definitely add more tests, the reason I didn't here was because the kernel implementation wasn't in place for this PR. I'll work on adding additional coverage.
@pytorchbot label "release notes: none" |
@Gasoonjia splitting the The CI failures are mainly due to two issues:
Do you have any suggestions for how we should handle the current approach of mapping |
Hi @keyprocedure thanks for your update! For places checking the
can you share me more insights here? I think you've create clone_dim_order kernel in aot side by reusing aten clone op. |
@Gasoonjia during export This is also why I placed the tests using What are your thoughts? |
@keyprocedure thanks for detailed reply! let's swap the order of PRs. We can first finish the runtime op, then aot replacement, finally RemoveCloneOpsTransform. |
That's a great idea! Should I move the tests from the runtime/kernel PR (since the new op won't be registered yet) to the aot replacement PR? |
Yes please! More specific: for the runtime pr, it should only contain:
for aot pr, it should contains both graph-level check, and the end2end test using pybinding. |
Hi @Gasoonjia I’ve updated the PRs, the kernel PR is ready for review. The CI failures from this PR that weren’t due to the missing
It seems like these failures share the same root cause: Any insights or guidance would be helpful |
@keyprocedure For the issue in this PR, can you share me the code pointer to the issue? Like which line raising that? |
There were a total of 49 failing tests for the initial CI run, so I listed out the test and line number of each failure:unittest-arm-backend-with-no-fvp (test_pytest_ops) / linux-job19 failures
The CI log also shows multiple TOSA partitioning rejections due to _clone_dim_order not being in BaseTOSASupportList. unittest-arm-backend-with-no-fvp (test_pytest_models) / linux-job30 failures
|
I think we should land the kernel PR before addressing any new failures from the latest CI run in this PR since this PR is dependent on the kernel existing for |
sure let's land prs one by one |
Summary
This is PR 2 of 3 implementing a dim order aware clone op.
This PR registers the new
_clone_dim_order
op and mapsaten.clone
ops todim_order_ops._clone_dim_order
during export to preserve memory layout changes (contiguous/channels_last).Related PRs:
_clone_dim_order
portable kernelFixes #12645
Test plan
All tests pass via:
python -m unittest exir.tests.test_memory_format_ops_pass