zheng-da commented on a change in pull request #15016: [MXNET-1406] [BUG] Fix 
DLManagedTensor deleter
URL: https://github.com/apache/incubator-mxnet/pull/15016#discussion_r285875930
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -4156,7 +4156,7 @@ def from_dlpack(dlpack):
     assert ctypes.pythonapi.PyCapsule_IsValid(dlpack, _c_str_dltensor), 
ValueError(
         'Invalid DLPack Tensor. DLTensor capsules can be consumed only once.')
     dlpack_handle = 
ctypes.c_void_p(ctypes.pythonapi.PyCapsule_GetPointer(dlpack, _c_str_dltensor))
-    check_call(_LIB.MXNDArrayFromDLPack(dlpack_handle, ctypes.byref(handle)))
+    check_call(_LIB.MXNDArrayFromDLPack(dlpack_handle, False, 
ctypes.byref(handle)))
 
 Review comment:
   if `transient_handle` is false, it means the dlpack_handle won't be free'd 
any time soon? However, how do we control when the dlpack_handle will be free'd?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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