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 2019/05/07 01:47:09 UTC

[GitHub] [incubator-mxnet] TaoLv commented on a change in pull request #14889: fix add_n bug: when input mem overlap with output mem, results is wrong

TaoLv commented on a change in pull request #14889: fix add_n bug: when input mem overlap with output mem, results is wrong
URL: https://github.com/apache/incubator-mxnet/pull/14889#discussion_r281435155
 
 

 ##########
 File path: src/ndarray/ndarray_function.cc
 ##########
 @@ -207,7 +207,10 @@ void ElementwiseSumContainsDnsImpl(mshadow::Stream<cpu>* s,
   using namespace mxnet::op::mxnet_op;
   const TBlob& out_data = out->data();
   MSHADOW_TYPE_SWITCH(out->dtype(), DType, {  // data type
-    Kernel<set_zero, cpu>::Launch(s, out_data.Size(), out_data.dptr<DType>());
+    // Do not set_zero if output mem inplace with input mem: elemwise_sum.cc FInplaceOption
 
 Review comment:
   Make this comment easy to understand. Add comment that output can be in-placed with the *first* input.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services