anirudh2290 commented on a change in pull request #11742: [MXNET-623] Fixing an integer overflow bug in large NDArray URL: https://github.com/apache/incubator-mxnet/pull/11742#discussion_r206736735
########## File path: src/operator/tensor/ordering_op-inl.h ########## @@ -367,7 +367,7 @@ void TopKImpl(RunContext ctx, // Additional temp space for gpu full sorts for batch ids. temp_size += sizeof(int) * src.Size(); // Temp space for cpu sorts. - temp_size = std::max(temp_size, sizeof(real_t) * src.Size()); + temp_size = std::max(temp_size, sizeof(real_t) * static_cast<size_t>(src.Size())); Review comment: we should change this to index_t. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
