anirudh2290 commented on a change in pull request #10452: [MXNET-294] Fix 
element wise multiply for csr ndarrays
URL: https://github.com/apache/incubator-mxnet/pull/10452#discussion_r180189135
 
 

 ##########
 File path: src/operator/tensor/elemwise_binary_op-inl.h
 ##########
 @@ -292,9 +292,7 @@ void ElemwiseBinaryOp::CsrCsrOp(mshadow::Stream<cpu> *s,
 
   OpBase::FillDense<IType>(s, next.shape_.Size(), IType(-1), req, next.dptr_);
   OpBase::FillDense<DType>(s, lhs_row.shape_.Size(), DType(0),  req, 
lhs_row.dptr_);
-  if (!same_lhs_rhs) {
-    OpBase::FillDense<DType>(s, rhs_row.shape_.Size(), DType(0), req, 
rhs_row.dptr_);
-  }
+  OpBase::FillDense<DType>(s, rhs_row.shape_.Size(), DType(0), req, 
rhs_row.dptr_);
 
 Review comment:
   if its the same_lhs_rhs can we point to the same tensor for both lhs and rhs 
instead of calling filldense for rhs ?

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

Reply via email to