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:
[email protected]
With regards,
Apache Git Services