access2rohit commented on a change in pull request #16371: Adding large tensor 
support and test for gather_nd
URL: https://github.com/apache/incubator-mxnet/pull/16371#discussion_r332170997
 
 

 ##########
 File path: src/operator/tensor/indexing_op.h
 ##########
 @@ -1311,15 +1311,15 @@ inline bool GatherNDType(const nnvm::NodeAttrs& attrs,
 
 struct gather_nd {
   template<typename DType, typename IType>
-  MSHADOW_XINLINE static void Map(int i, OpReqType req, int N, int M, int K,
+  MSHADOW_XINLINE static void Map(index_t i, OpReqType req, index_t N, index_t 
M, index_t K,
                                   const mshadow::Shape<10> strides,
                                   DType* out, const DType* data,
                                   const IType* indices) {
-    int offset = 0;
-    for (int j = 0; j < M; ++j) {
+    index_t offset = 0;
+    for (index_t j = 0; j < M; ++j) {
       offset += strides[j] * static_cast<int>(indices[j*N + i]);
 
 Review comment:
   my bad. it should be cast to index_t

----------------------------------------------------------------
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