-
Notifications
You must be signed in to change notification settings - Fork 607
Insert transposes around view_copy ops #6435
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
Insert transposes around view_copy ops #6435
Conversation
Signed-off-by: Oscar Andersson <[email protected]> Change-Id: Ic15088557542ff6c3c97bda2cb0bd3ab642e00ef Signed-off-by: Erik Lundell <[email protected]> Change-Id: I0c64f6f92d4173420af0a6cf2d707c63beeeaa00
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6435
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 6294ab5 with merge base 0aa802d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
curious if there is a copy cost of doing these? is there a value in optimizing these nodes we are inserting here |
@@ -148,7 +148,8 @@ def test_layer_norm_tosa_BI( | |||
self.LayerNorm(*model_params), (test_data,) | |||
) | |||
|
|||
@parameterized.expand(test_data_suite) | |||
# Skip last test since it requires transpose. |
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.
and U55 doesn't support it.
@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Skip an additional test
There is a copy cost, and we also want to minimize transpose use since it's not always supported. I came up with a criteria that is a bit smarter than always inserting them in this PR but it might be possible to reduce them even more. We have discussed introducing some way of lazingly transposing just when it's needed but we are focusing on getting things functional first. |
Sounds good. We do something greedy on XNNPACK side to reduce number of format switches. |
@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Change-Id: Ic15088557542ff6c3c97bda2cb0bd3ab642e00ef
Change-Id: I0c64f6f92d4173420af0a6cf2d707c63beeeaa00