GPU Batched NMS

This commit is contained in:
Marcos Luciano
2022-06-19 12:40:08 -03:00
parent df9d61549e
commit 42abd4a80a

View File

@@ -75,7 +75,7 @@ cudaError_t sortDetections(
int threads_per_block = 0; int threads_per_block = 0;
int number_of_blocks = 4; int number_of_blocks = 4;
if (_topK % 2 == 0 || _topK >= number_of_blocks) if (_topK % 2 == 0 && _topK >= number_of_blocks)
threads_per_block = _topK / number_of_blocks; threads_per_block = _topK / number_of_blocks;
else else
threads_per_block = (_topK / number_of_blocks) + 1; threads_per_block = (_topK / number_of_blocks) + 1;