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 2018/06/17 00:30:54 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #11316: MXNET_FORCE_ADDTAKEGRAD to disable AddTakeGradLargeBatchCaller

eric-haibin-lin commented on a change in pull request #11316: MXNET_FORCE_ADDTAKEGRAD to disable AddTakeGradLargeBatchCaller
URL: https://github.com/apache/incubator-mxnet/pull/11316#discussion_r195915212
 
 

 ##########
 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:
   Operator doesn't have a class. Suggest to `dmlc::GetEnv` and make the result static so lookup is done only once. 

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


With regards,
Apache Git Services