Make data_ptr a method on Tensor#20878
Closed
li-roy wants to merge 4 commits intogh/li-roy/23/basefrom
Closed
Conversation
Contributor
|
Don't we have a |
Contributor
Author
|
We do, I'm just binding it manually like |
Collaborator
|
Just curious - what's the reason of not making it a native_function instead? |
zdevito
approved these changes
May 29, 2019
Contributor
Author
|
A couple reasons: it's method that's not a function, doesn't have backend specific dispatch, there's no reason it can't be a method directly on tensor like size() or data(). Another reason is it's the only native_function that uses void*, so moving it means we don't have to blacklist it in gen_jit_dispatch nor support it in c10 dispatcher. |
Make data_ptr a method on Tensor gh-metadata: pytorch pytorch 20878 gh/li-roy/23/head
Contributor
|
Failures are legit. |
added 2 commits
May 29, 2019 11:03
Make data_ptr a method on Tensor gh-metadata: pytorch pytorch 20878 gh/li-roy/23/head
Make data_ptr a method on Tensor gh-metadata: pytorch pytorch 20878 gh/li-roy/23/head
Contributor
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
May 30, 2019
Summary: Pull Request resolved: pytorch/pytorch#20878 ghimport-source-id: f19993d97ecb8cfcd60b371d9ed49e3ad2e051c7 Differential Revision: D15482061 Pulled By: li-roy fbshipit-source-id: c0563ce849fc3277e86a1a58bd384e38365786b2
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
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:
Make this a method on Tensor rather than a native function. We don't have to support void* in c10 dispatcher, and we can stop blacklisting this in jit registry.
Differential Revision: D15482061