Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix bipartite match memory corruption
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadiaphy committed Dec 25, 2018
1 parent 48bbac5 commit 0d27e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operator/contrib/bounding_box-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Tensor<xpu, 1, DType> workspace = ctx.requested[0]
.get_space_typed<xpu, 1, DType>(Shape1(workspace_size), s);
Tensor<xpu, 1, DType> scores_copy(workspace.dptr_,
Expand Down

0 comments on commit 0d27e11

Please sign in to comment.