-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[PyTorch] IValue::toTensor can now return const Tensor& #48868
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 1325e5d (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
…eturn const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 4, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 117914173 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 12, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118468561 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 15, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118658273 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
…nsor can now return const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
…nsor can now return const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 16, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118718144 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 16, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118754514 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
…eturn const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 18, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118936155 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
…turn const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 19, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 118965482 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 22, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119023481 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
…can now return const Tensor&" Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 22, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119032050 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Dec 22, 2020
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119032050 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)! [ghstack-poisoned]
swolchok
added a commit
that referenced
this pull request
Jan 4, 2021
Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119327372 Differential Revision: [D25325379](https://our.internmc.facebook.com/intern/diff/D25325379/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D25325379/)!
This pull request has been merged in a440491. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 6, 2021
Summary: Pull Request resolved: #48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119327372 Test Plan: internal benchmarks. Reviewed By: bwasti Differential Revision: D25325379 fbshipit-source-id: ca699632901691bcee432f595f75b0a4416d55dd
hwangdeyu
pushed a commit
to hwangdeyu/pytorch
that referenced
this pull request
Jan 14, 2021
Summary: Pull Request resolved: pytorch#48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119327372 Test Plan: internal benchmarks. Reviewed By: bwasti Differential Revision: D25325379 fbshipit-source-id: ca699632901691bcee432f595f75b0a4416d55dd
jjsjann123
pushed a commit
to jjsjann123/nvfuser
that referenced
this pull request
Oct 29, 2022
Summary: Pull Request resolved: pytorch/pytorch#48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119327372 Test Plan: internal benchmarks. Reviewed By: bwasti Differential Revision: D25325379 fbshipit-source-id: ca699632901691bcee432f595f75b0a4416d55dd
jjsjann123
pushed a commit
to jjsjann123/nvfuser
that referenced
this pull request
Nov 10, 2022
Summary: Pull Request resolved: pytorch/pytorch#48868 Building on the previous diff, we can make `toTensor()` return a `const Tensor&`, which should make it easier to avoid reference counting. ghstack-source-id: 119327372 Test Plan: internal benchmarks. Reviewed By: bwasti Differential Revision: D25325379 fbshipit-source-id: ca699632901691bcee432f595f75b0a4416d55dd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Building on the previous diff, we can make
toTensor()
return aconst Tensor&
, which should make it easier to avoid referencecounting.
Differential Revision: D25325379
NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!