Skip to content

Conversation

@ani300
Copy link
Collaborator

@ani300 ani300 commented Nov 7, 2022

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

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 7, 2022

🔗 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 Failures

As of commit e0a79eb:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 7, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ani300 / name: Antoni Viros (c51a6080d4fb4af72a928154f9911481a13436dc)

@pytorch-bot pytorch-bot bot added the release notes: cpp release notes category label Nov 7, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@ani300 ani300 requested a review from cpuhrsch November 7, 2022 16:49
Comment on lines 397 to 394
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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());

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@ani300 ani300 changed the title Add implementation for foreach_add and add irregular dimension selection for nested tensors. Add implementation for irregular dimension selection for nested tensors. Nov 8, 2022
Copy link
Contributor

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?

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@ani300 ani300 requested a review from cpuhrsch November 8, 2022 19:32
Copy link
Contributor

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 :)

@albanD albanD removed their request for review November 8, 2022 19:43
ani300 pushed a commit to ani300/pytorch that referenced this pull request Nov 8, 2022
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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@ani300
Copy link
Collaborator Author

ani300 commented Nov 8, 2022

@pytorchbot merge -g

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 8, 2022
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: The following mandatory check(s) failed (Rule superuser):

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised 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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41083993

@ani300
Copy link
Collaborator Author

ani300 commented Nov 8, 2022

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

mikaylagawarecki added a commit that referenced this pull request Nov 16, 2022
Implementation in  #88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1


[ghstack-poisoned]
mikaylagawarecki added a commit that referenced this pull request Nov 16, 2022
Implementation in  #88585 should work for all dimensions. Removed unnecessary check that constrained select to dims 0 and 1


[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Nov 16, 2022
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
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
…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
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: cpp release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants