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/04/05 18:18:14 UTC

[GitHub] piiswrong commented on a change in pull request #10374: Sparse support for Custom Op

piiswrong commented on a change in pull request #10374: Sparse support for Custom Op
URL: https://github.com/apache/incubator-mxnet/pull/10374#discussion_r179555745
 
 

 ##########
 File path: include/mxnet/ndarray.h
 ##########
 @@ -507,6 +507,27 @@ class NDArray {
     ret.reuse_ = true;
     return ret;
   }
+
+  /*!
+   * \brief Update ndarray chunk storage handles using existing ndarray storage handles
+   * Also update the aux_handle, aux_shapes and aux_types.
+   * This is specifically used for custom op to update the inputs and outputs from
+   * the temporary ndarray which stores intermediate custom op results.
+   * Should be used with caution elsewhere. Supports only CSR and RSP formats.
+   */
+  inline void SparseUpdateChunk(const NDArray &arr) const {
+    auto stype = arr.storage_type();
+    CHECK(stype == kCSRStorage || stype == kRowSparseStorage)
 
 Review comment:
   Check that shape and dtype are the same.

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