-
Notifications
You must be signed in to change notification settings - Fork 709
TensorLayout updates #7870
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
TensorLayout updates #7870
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7870
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 4df1982 with merge base a836b64 ( BROKEN TRUNK - The following job 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. |
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
fc69ba8 to
5c64044
Compare
Summary: Addressing comments from D67048723 Differential Revision: D68535453
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
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.
Thanks for responding to my comments on the previous PR!
runtime/core/tensor_layout.h
Outdated
| nbytes_(calculate_nbytes(sizes_, scalar_type_)) {} | ||
|
|
||
| Span<const uint8_t> dim_order); | ||
| TensorLayout(const TensorLayout&) = default; |
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.
Since all "rule of five" methods are set to default, I thiiink you can avoid mentioning any of them.
If you're depending on the ability to move, assign, and implicit-construct, then please add tests for those cases. If they pass without these default overrides then all the better.
5c64044 to
11fd4f2
Compare
Summary: Addressing comments from D67048723 Differential Revision: D68535453
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
Summary: Addressing comments from D67048723 Differential Revision: D68535453
11fd4f2 to
3b83e46
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
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.
Looking good! Just some final requests for new tests, but the public API looks good to me.
| dim_order_(dim_order), | ||
| scalar_type_(scalar_type), | ||
| nbytes_(calculate_nbytes(sizes_, scalar_type_)) {} | ||
| TensorLayout() = delete; |
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 don't think you need to do this since you declare a non-default ctor.
https://en.cppreference.com/w/cpp/language/default_constructor
Implicitly-declared default constructor
If there is no user-declared constructor or constructor template for a class type, the compiler will implicitly declare a default constructor as an inline public member of its class.
3b83e46 to
aea31dd
Compare
Summary: Addressing comments from D67048723 Differential Revision: D68535453
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
Summary: Addressing comments from D67048723 Differential Revision: D68535453
aea31dd to
8740e8a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
Summary: Addressing comments from D67048723 Reviewed By: JacobSzwejbka Differential Revision: D68535453
8740e8a to
4df1982
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68535453 |
Differential Revision: D68535453 Pull Request resolved: #7870
Differential Revision: D68535453 Pull Request resolved: pytorch#7870
Summary: Addressing comments from D67048723
Differential Revision: D68535453