szha commented on a change in pull request #11316: MXNET_FORCE_ADDTAKEGRAD to disable AddTakeGradLargeBatchCaller URL: https://github.com/apache/incubator-mxnet/pull/11316#discussion_r195914883
########## File path: src/operator/tensor/indexing_op.h ########## @@ -598,7 +598,12 @@ void EmbeddingOpBackward(const nnvm::NodeAttrs& attrs, uint64_t shape_out_prod = static_cast<uint64_t>(grad_out.shape_[0])* static_cast<uint64_t>(grad_out.shape_[1]); - if (shape_out_prod < (uint64_t)16384 && shape_in_prod < (uint64_t)16384) { + + const char *type = getenv("MXNET_FORCE_ADDTAKEGRAD"); + const bool default_addtakegrad = (type == nullptr); Review comment: shall we do this in constructor and keep it as a private variable instead? ---------------------------------------------------------------- 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