lebeg commented on a change in pull request #11742: [MXNET-623][WIP] Fixing an integer overflow bug in large NDArray URL: https://github.com/apache/incubator-mxnet/pull/11742#discussion_r217424996
########## File path: src/c_api/c_api_function.cc ########## @@ -56,7 +56,7 @@ std::vector<nnvm::NodeEntry> Gradient( std::vector<nnvm::NodeEntry> ret; for (index_t i = 0; i < g->num_outputs(); ++i) { - ret.emplace_back(nnvm::NodeEntry{g, i, 0}); + ret.emplace_back(nnvm::NodeEntry{g, static_cast<uint32_t>(i), 0}); Review comment: @apeforest Ok, but then I think it would make sense to indicate an error here somehow, because if it doesn't fit the behaviour is undefined. ---------------------------------------------------------------- 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