haojin2 commented on a change in pull request #10550: [MXNET-320] Support elemwise_add/sub/max/min/hypot between dense and csr tensors URL: https://github.com/apache/incubator-mxnet/pull/10550#discussion_r181541934
########## File path: src/operator/elemwise_op_common.h ########## @@ -73,6 +73,12 @@ inline bool ElemwiseStorageAttr(const nnvm::NodeAttrs& attrs, dispatched = storage_type_assign(out_attrs, kCSRStorage, dispatch_mode, dispatch_ex); } + if (!dispatched && (((*in_attrs)[0] == kDefaultStorage && (*in_attrs)[1] == kCSRStorage) || + ((*in_attrs)[0] == kCSRStorage && (*in_attrs)[1] == kDefaultStorage))) { + // dense, csr -> csr + dispatched = storage_type_assign(out_attrs, kDefaultStorage, Review comment: What about I add a check for # of in_attrs and out_attrs? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services