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