tqchen commented on a change in pull request #12047: [MXNET-779]Add DLPack
Transformation API
URL: https://github.com/apache/incubator-mxnet/pull/12047#discussion_r207954074
##########
File path: src/ndarray/ndarray.cc
##########
@@ -312,6 +312,46 @@ NDArray NDArray::data_ndarray() const {
return ret;
}
+struct NDArrayDLManager {
+ NDArray handle; // ref NDArray
+ DLManagedTensor tensor;
+ TShape strides; // store variable strides
Review comment:
DLPack allow strides field to be nullptr, for mxnet do do not need to store
strides, as we only support compact tensor for now.
----------------------------------------------------------------
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