-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Refactor fastGet/fastSet for clarity, removing a null pointer check. #11902
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
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
Differential Revision: D9977505 Differential Version: 58461947
Differential Revision: D9977654 Differential Version: 58462738
Closed
facebook-github-bot
pushed a commit
that referenced
this pull request
Sep 21, 2018
Summary: Stack: :black_circle: **#11900 Retainable is no more** [:yellow_heart:](https://our.intern.facebook.com/intern/diff/D9977505/) :white_circle: #11902 Refactor fastGet/fastSet for clarity, removing a null pointer check. [:yellow_heart:](https://our.intern.facebook.com/intern/diff/D9977654/) Kill it with fire Pull Request resolved: #11900 Differential Revision: D9979779 Pulled By: ezyang fbshipit-source-id: 0a437e7a0baadb6440e7dc39a01b4a406171faa7
iotamudelta
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Sep 21, 2018
Summary: Stack: :black_circle: **pytorch#11900 Retainable is no more** [:yellow_heart:](https://our.intern.facebook.com/intern/diff/D9977505/) :white_circle: pytorch#11902 Refactor fastGet/fastSet for clarity, removing a null pointer check. [:yellow_heart:](https://our.intern.facebook.com/intern/diff/D9977654/) Kill it with fire Pull Request resolved: pytorch#11900 Differential Revision: D9979779 Pulled By: ezyang fbshipit-source-id: 0a437e7a0baadb6440e7dc39a01b4a406171faa7
Member
|
looks like this is good to go? |
Contributor
Author
|
needs an approval |
apaszke
reviewed
Sep 25, 2018
| // which are annoying to handle since 99% of values are at::Tensor anyway | ||
| // instead we create a fake subclass of TensorImpl that can be subclassed | ||
| // to hold arbitrary things | ||
| // Sometimes we want to pass things that are not tensors. Instead of |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Sep 25, 2018
…(#11902) Summary: Pull Request resolved: pytorch/pytorch#11902 Previously, they were going through THTensor_getStoragePtr which incurred a null pointer check on storage. Now they use unsafe_data method which doesn't do this check. I don't know if this actually make things go faster, but I get an added bonus of reducing code duplication, so we should take this change anyway :) Reviewed By: SsnL Differential Revision: D9977654 fbshipit-source-id: f45c74828213a0439480755ad0b2d7f8858cb327
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:
:black_circle: #11902 Refactor fastGet/fastSet for clarity, removing a null pointer check. 💛
Previously, they were going through THTensor_getStoragePtr which
incurred a null pointer check on storage. Now they use unsafe_data
method which doesn't do this check.
I don't know if this actually make things go faster, but I get
an added bonus of reducing code duplication, so we should take
this change anyway :)
Differential Revision: D9977654