Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Sep 20, 2018

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

Differential Revision: D9977505
Differential Version: 58461947
Differential Revision: D9977654
Differential Version: 58462738
@ezyang ezyang mentioned this pull request Sep 20, 2018
@ezyang ezyang changed the base branch from export-D9977505 to master September 20, 2018 19:55
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
@fmassa
Copy link
Member

fmassa commented Sep 25, 2018

looks like this is good to go?

@ezyang
Copy link
Contributor Author

ezyang commented Sep 25, 2018

needs an approval

// 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.

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
@soumith soumith deleted the export-D9977654 branch February 21, 2019 23:24
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants