wkcn edited a comment on issue #13658: Converting MX array to DLPack crashes 
when MX array goes out-of-scope
URL: 
https://github.com/apache/incubator-mxnet/issues/13658#issuecomment-447893253
 
 
   @jermainewang Let me test it for TVM.
   ```python
   import tvm
   import mxnet as mx
   
   tvm_a = tvm.ndarray.array([1, 2, 3])
   tvm_pack = tvm_a.to_dlpack()
   
   mx_a = mx.nd.from_dlpack(tvm_pack)
   print(mx_a)
   
   mx_b = mx.nd.array([4, 5, 6])
   mx_pack = mx_b.to_dlpack_for_write()
   tvm_b = tvm.nd.from_dlpack(mx_pack)
   print(tvm_b)
   ```
   ```
   mxnet==1.5.0b20181216
   tvm: 0.5.dev
   ```
   It seems that there is no bug in TVM.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to