-
Notifications
You must be signed in to change notification settings - Fork 667
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
tensor add storage method #10311
tensor add storage method #10311
Conversation
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/10311/ |
Speed stats:
|
@@ -533,6 +533,10 @@ def _conj_physical(self): | |||
return flow._C.conj_physical(self) | |||
|
|||
|
|||
def _storage(self): | |||
return self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这只是个快速的修复,oneflow tensor 貌似内部还没有 storage 这个接口暴露出来,而是直接有个 data_ptr
{"data_ptr", PyTensorObject_data_ptr, METH_NOARGS, NULL}, |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/10311/ |
Speed stats:
|
对齐 torch 给tensor添加 storage 方法