-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add implementation for irregular dimension selection for nested tensors. #88585
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88585
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e0a79eb: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
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.
| std::vector<Tensor> flat_tensors; | |
| std::vector<Tensor> sizes; | |
| std::vector<Tensor> flat_tensors; | |
| flat_tensors.reserve(tensor_node.degree()); | |
| std::vector<Tensor> sizes; | |
| sizes.reserve(tensor_node.degree()); |
c7e7c5d to
5f12bd4
Compare
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
5f12bd4 to
c51a608
Compare
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
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 you only need this value of bounds checking, why not do this as part of the loop below?
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
c51a608 to
c516659
Compare
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.
Just before we forget: This is now unused :)
Summary: Pull Request resolved: pytorch#88585 This diff modifies the implementation of the select operator so slices of the irregular dimension can be selected (e.g. nt[:,0,:]). Test Plan: Added new unit tests to test that the new function works as intended (see them in diff). To test, `buck test mode/dev-nosan //caffe2/test:nested` Reviewed By: cpuhrsch Differential Revision: D41083993 fbshipit-source-id: ec381764ab66878f2ff08dd1e23327136e77c78b
c516659 to
a0deeca
Compare
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
|
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: The following mandatory check(s) failed (Rule Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
Summary: Pull Request resolved: pytorch#88585 This diff modifies the implementation of the select operator so slices of the irregular dimension can be selected (e.g. nt[:,0,:]). Test Plan: Added new unit tests to test that the new function works as intended (see them in diff). To test, `buck test mode/dev-nosan //caffe2/test:nested` Reviewed By: cpuhrsch Differential Revision: D41083993 fbshipit-source-id: 9666dc4e3ba7ef9e0edf3e3c655a1150eeaa5268
|
This pull request was exported from Phabricator. Differential Revision: D41083993 |
a0deeca to
e0a79eb
Compare
|
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Implementation in #88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1 [ghstack-poisoned]
Implementation in #88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1 [ghstack-poisoned]
Implementation in #88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1 Pull Request resolved: #89150 Approved by: https://github.com/cpuhrsch
…rs. (pytorch#88585) Summary: This diff modifies the implementation of the select operator so slices of the irregular dimension can be selected (e.g. nt[:,0,:]). Test Plan: Added new unit tests to test that the new functions work as intended (see them in diff). To test, `buck test mode/dev-nosan //caffe2/test:nested` Differential Revision: D41083993 Pull Request resolved: pytorch#88585 Approved by: https://github.com/cpuhrsch
Implementation in pytorch#88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1 Pull Request resolved: pytorch#89150 Approved by: https://github.com/cpuhrsch
Summary: This diff modifies the implementation of the select operator so slices of the irregular dimension can be selected (e.g. nt[:,0,:]).
Test Plan:
Added new unit tests to test that the new functions work as intended (see them in diff). To test,
buck test mode/dev-nosan //caffe2/test:nestedDifferential Revision: D41083993