diff --git a/paddle/operators/iou_similarity_op.cu b/paddle/operators/iou_similarity_op.cu index c270167e117defc4131a2b40a7cf17b30b583ca5..526edaefeea98b0760832c6b24fcb2d38b3aa00e 100755 --- a/paddle/operators/iou_similarity_op.cu +++ b/paddle/operators/iou_similarity_op.cu @@ -18,4 +18,5 @@ limitations under the License. */ namespace ops = paddle::operators; REGISTER_OP_CUDA_KERNEL( iou_similarity, - ops::IOUSimilarityKernel); + ops::IOUSimilarityKernel, + ops::IOUSimilarityKernel); diff --git a/paddle/operators/iou_similarity_op.h b/paddle/operators/iou_similarity_op.h index 45bef2f7eece369fcc2e755c386dafd2504222f8..fa1b60ae34eeee2cf534607606568f527f1bd67b 100644 --- a/paddle/operators/iou_similarity_op.h +++ b/paddle/operators/iou_similarity_op.h @@ -46,7 +46,7 @@ struct IOUSimilarityFunctor { T y_min1 = x_[row_id * 4 + 1]; T x_max1 = x_[row_id * 4 + 2]; T y_max1 = x_[row_id * 4 + 3]; - for (int i = 0; i < cols_; ++i) { + for (size_t i = 0; i < cols_; ++i) { T x_min2 = y_[i * 4]; T y_min2 = y_[i * 4 + 1]; T x_max2 = y_[i * 4 + 2];