-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add support for .to() for NestedTensor backends #87146
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87146
Note: Links to docs will display an error until the docs builds have been completed. ✅ No Failures, 1 PendingAs of commit 54edfa1: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D40437585 |
This pull request was exported from Phabricator. Differential Revision: D40437585 |
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 fbshipit-source-id: 6f42b1dffa53d0945c19a92b0e087ea6abc978f0
57066d5
to
357f62b
Compare
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 fbshipit-source-id: c15c94cbddad67224f3d133fa0bd4b653a66fb1e
357f62b
to
64bba96
Compare
This pull request was exported from Phabricator. Differential Revision: D40437585 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D40437585 |
64bba96
to
1357cdd
Compare
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 fbshipit-source-id: 827ab5a96ce91a2b7b442607bc039d1a95e6c0b1
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 fbshipit-source-id: d59e0d83e04304033289a0fda099d157588c9e7d
1357cdd
to
238f326
Compare
This pull request was exported from Phabricator. Differential Revision: D40437585 |
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.
Few small comments but otherwise I think this is very close, great job
238f326
to
8c37860
Compare
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 fbshipit-source-id: b54894943c605a619d900bc9cabebf5c0925e37b
This pull request was exported from Phabricator. Differential Revision: D40437585 |
@@ -1,5 +1,7 @@ | |||
#include <ATen/native/nested/NestedTensorMath.h> | |||
|
|||
#include <c10/util/Optional.h> |
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.
Nit: do we need to add these headers? maybe we should have had the optional.h , but do we need the Copy.h header
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.
👍
Summary: Pull Request resolved: pytorch#87146 This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Reviewed By: drisspg Differential Revision: D40437585 fbshipit-source-id: b2b70ba4852c3b4ba4ae5d9ce796a37a902fb80a
This pull request was exported from Phabricator. Differential Revision: D40437585 |
8c37860
to
54edfa1
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Hey @ani300. |
Summary: This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140. Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job. Differential Revision: D40437585 Pull Request resolved: pytorch#87146 Approved by: https://github.com/drisspg
Summary: This commit adds support for moving NestedTensors from CPU to GPU and back. The implementation includes requires implementing empty_like(), which is based on PR#83140.
Test Plan: Added a new unit test based on the unit test for the main .to() implementation. All unit tests must pass, as well as every sandcastle job.
Differential Revision: D40437585