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 16:34:17 UTC

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

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

 ##########
 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:
   Just to confirm. Such check should never fail as `ToDLPack` will only be called after `wait_to_read` or `wait_to_write` so the NDArray should always be initialized.

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