apeforest commented on a change in pull request #17444: [Large Tensor] Add LT 
support for NN optimizers and 1 activation function
URL: https://github.com/apache/incubator-mxnet/pull/17444#discussion_r374979974
 
 

 ##########
 File path: src/operator/optimizer_op-inl.h
 ##########
 @@ -225,7 +225,7 @@ struct MultiSGDKernelParam {
 template <typename MPDType, bool has_momentum, bool has_mixed_precision>
 struct MultiSGDKernel {
   template<typename DType>
-  MSHADOW_XINLINE static void Map(int i, const MultiSGDKernelParam<DType, 
MPDType>& param,
+  MSHADOW_XINLINE static void Map(index_t i, const MultiSGDKernelParam<DType, 
MPDType>& param,
     const OpReqType req) {
     for (int index = 0; index < param.count; ++index) {
       if ((size_t)i < param.sizes[index]) {
 
 Review comment:
   @access2rohit I think this is a problem for non 64-bit platform, not only to 
this line of code. A better solution could be adding an assert in the front end 
when tensor size/index is greater than int32 and platform is not 64-bit. What 
do you think?
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to