diff --git a/onnxruntime/core/providers/cuda/object_detection/non_max_suppression_impl.cu b/onnxruntime/core/providers/cuda/object_detection/non_max_suppression_impl.cu index a239686dae..270b8283db 100644 --- a/onnxruntime/core/providers/cuda/object_detection/non_max_suppression_impl.cu +++ b/onnxruntime/core/providers/cuda/object_detection/non_max_suppression_impl.cu @@ -423,7 +423,7 @@ Status NonMaxSuppressionImpl( IAllocatorUniquePtr d_normalized_output_indices_ptr{allocator(num_to_keep * 3 * sizeof(int64_t))}; auto* d_normalized_output_indices = static_cast(d_normalized_output_indices_ptr.get()); - int blocksPerGrid = (int)(ceil(static_cast(num_to_keep) / GridDim::maxThreadsPerBlock)); + blocksPerGrid = (int)(ceil(static_cast(num_to_keep) / GridDim::maxThreadsPerBlock)); IndexMultiSelect<<>>(num_to_keep, d_selected_indices, d_sorted_indices, d_output_indices); NormalizeOutput<<>>(num_to_keep, d_output_indices, d_normalized_output_indices, batch_index, class_index); CUDA_RETURN_IF_ERROR(cudaGetLastError());