eric-haibin-lin 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_r181541710
########## 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: 1. Changing `ElemwiseStorageAttr` will affect ALL operators using this function. 2. Unary op also uses this function. There's no guarantee len(in_attr) > 1. ---------------------------------------------------------------- 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