-
Notifications
You must be signed in to change notification settings - Fork 713
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
this is the first PR of WWZ team! #96
base: master
Are you sure you want to change the base?
Conversation
This is the first pr of WWZ team!!!
Welcome @Fengjuzhuwhw! |
Hi @Fengjuzhuwhw. Thanks for your PR. I'm waiting for a mindspore-ai member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
W00wssoooow!!! |
mindspore/numpy/dlpack.py
Outdated
return PyCapsule_New(ctypes.byref(dl_managed_tensor), b'dltensor', None) | ||
|
||
## dlpack to numpy.array | ||
def numpy_from_dlpack(pycapsule): |
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.
Please add from_dlpack(pycapsule)
method to implement dlpack to mindspore.Tensor
.
from mindspore import Tensor | ||
import numpy as np | ||
def tensor_from_numpy(data_numpy): | ||
return Tensor(data_numpy) |
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.
It would be better to have a check with the type data_numpy
with the below:
if not isinstance(data_numpy, np.array):
panic()
/ok-to-test |
Thinks a lot ! we will recheck it. |
this is the second PR of WZZ team!
this is the second PR of WZZ team! |
@Fengjuzhuwhw: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What type of PR is this?
What does this PR do / why do we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewers: