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/12/20 21:45:05 UTC

[GitHub] wkcn commented on a change in pull request #13698: Fix NDArray ToDLPack Bug

wkcn commented on a change in pull request #13698: Fix NDArray ToDLPack Bug
URL: https://github.com/apache/incubator-mxnet/pull/13698#discussion_r243427501
 
 

 ##########
 File path: src/ndarray/ndarray.cc
 ##########
 @@ -330,11 +330,10 @@ struct NDArrayDLManager {
 };
 
 DLManagedTensor* NDArray::ToDLPack() const {
+  CHECK(!is_none()) << "NDArray is not initialized";
 
 Review comment:
   Yes. But when users use C++ API directly, they may forget to call WaitToRead or WaitToWrite before calling ToDLPack.

----------------------------------------------------------------
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