samskalicky commented on a change in pull request #17569: Adding sparse support 
to MXTensor for custom operators
URL: https://github.com/apache/incubator-mxnet/pull/17569#discussion_r387404776
 
 

 ##########
 File path: include/mxnet/lib_api.h
 ##########
 @@ -229,20 +241,75 @@ enum MXReturnValue {
   MX_SUCCESS = 1,
 };
 
+// For sparse input, read/write the data from NDarray via pointers.
+struct MXInSparse {
+  // Pointer to data.
+  void *data{nullptr};
+  // length of (non-zero) data.
+  int64_t data_len;
+
+  // To store aux data for sparse.
+  // For CSR, indices stores the col index of non-zero values.
+  // For row sparse, indices store row index of rows which have non-zero 
values.
+  int64_t* indices;
+  int64_t indices_len;
+
+  // For CSR, indptr gives the start and end index of data for each row.
+  // For row sparse, indptr is empty. 
 
 Review comment:
   "indptr is empty" ==> "indptr is not used"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to