You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/12/26 18:28:42 UTC

[GitHub] sandeep-krishnamurthy commented on a change in pull request #13727: fix memory corruption in gluoncv ssd training

sandeep-krishnamurthy commented on a change in pull request #13727: fix memory corruption in gluoncv ssd training
URL: https://github.com/apache/incubator-mxnet/pull/13727#discussion_r244032106
 
 

 ##########
 File path: src/operator/contrib/bounding_box-inl.h
 ##########
 @@ -785,7 +785,7 @@ void BipartiteMatchingForward(const nnvm::NodeAttrs& attrs,
      .get_with_shape<xpu, 2, DType>(Shape2(batch_size, col), s);
     Shape<1> sort_index_shape = Shape1(dshape.Size());
     index_t workspace_size = sort_index_shape.Size();
-    workspace_size += ((sort_index_shape.Size() * sizeof(int32_t) - 1) / sizeof(DType)) * 2;
+    workspace_size += (sort_index_shape.Size() * 2 * sizeof(int32_t) - 1) / sizeof(DType) + 1;
 
 Review comment:
   Sorry for my naive understanding. But, I do not understand why +1? And this mean, we will have one extra size in the workspace always?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services