You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/07/31 01:49:53 UTC
[GitHub] wkcn commented on issue #11927: Substitute of
torch.Tensor.data_ptr()
wkcn commented on issue #11927: Substitute of torch.Tensor.data_ptr()
URL: https://github.com/apache/incubator-mxnet/issues/11927#issuecomment-409067222
Using `MXNDArrayGetData` to get the first element of the NDArray.
Notice: You should call `wait_to_read` before reading a NDArray and call `wait_to_write` before writing a NDArray.
There is no `wait_to_write` in NDArray, so
`mx.nd.NDArray.wait_to_write = lambda self : _LIB.MXNDArrayWaitToWrite(self.handle)`
Example:
https://github.com/wkcn/MobulaOP/blob/master/mobula_op/glue/mx.py#L28
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services