Merge pull request #24104 from cudawarped:cuda_fix_cuda_toolkit_12_2

`cuda`: fix for compatibility with CUDA Toolkit >= 12.2.0
This commit is contained in:
Alexander Smorkalov 2023-08-04 12:11:15 +03:00 committed by GitHub
commit 5466fd2606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
* or there might be several weights * or there might be several weights
* or we don't have to scale * or we don't have to scale
*/ */
if (weight != 1.0) if (weight != static_cast<T>(1.0f))
{ {
kernels::scale1_with_bias1<T>(stream, output, input, weight, 1.0); kernels::scale1_with_bias1<T>(stream, output, input, weight, 1.0);
} }

View File

@ -121,7 +121,7 @@ namespace cv { namespace dnn { namespace cuda4dnn {
new_coords new_coords
); );
if (nms_iou_threshold > 0) { if (nms_iou_threshold > static_cast<T>(0.0f)) {
auto output_mat = output_wrapper->getMutableHostMat(); auto output_mat = output_wrapper->getMutableHostMat();
CV_Assert(output_mat.type() == CV_32F); CV_Assert(output_mat.type() == CV_32F);
for (int i = 0; i < input.get_axis_size(0); i++) { for (int i = 0; i < input.get_axis_size(0); i++) {