From 1ce1a51d4622775d29a619c194037b8dbd14df87 Mon Sep 17 00:00:00 2001 From: Yulong Wang Date: Wed, 27 Jan 2021 15:32:34 -0800 Subject: [PATCH] fix SDL native rule warning #6246 (#6461) --- .../providers/cuda/object_detection/non_max_suppression_impl.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());