apeforest commented on a change in pull request #15170: [MXNET-1413] Adding 
Large Tensor support for sort operators
URL: https://github.com/apache/incubator-mxnet/pull/15170#discussion_r296036559
 
 

 ##########
 File path: src/operator/tensor/ordering_op-inl.h
 ##########
 @@ -605,30 +633,32 @@ void TopKBackwardImpl(const OpContext &ctx,
   using namespace mshadow::expr;
   Stream<xpu> *s = ctx.run_ctx.get_stream<xpu>();
   CHECK(param.ret_typ == topk_enum::kReturnValue || param.ret_typ == 
topk_enum::kReturnBoth);
-  int batch_size, element_num;  // number of batches + the size of each batch
+  size_t batch_size;
 
 Review comment:
   Yes, I agree with @larroy leaving no uninit variables is a good SE practice. 
Class object should have its own default constructors, if not, then the design 
of class need improvement.

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