From f0149cdae29bc429537237c2bd9bc828822828f7 Mon Sep 17 00:00:00 2001 From: YashasSamaga Date: Sun, 9 Aug 2020 14:43:20 +0530 Subject: [PATCH] fix compile-time errors, disable unsupported tests --- modules/dnn/src/cuda/detection_output.cu | 10 +++++++--- modules/dnn/test/test_onnx_importer.cpp | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/dnn/src/cuda/detection_output.cu b/modules/dnn/src/cuda/detection_output.cu index 4d54540b05..9e38f0cf42 100644 --- a/modules/dnn/src/cuda/detection_output.cu +++ b/modules/dnn/src/cuda/detection_output.cu @@ -673,18 +673,22 @@ void launch_decode_boxes_kernel(const Stream& stream, Span decoded_bboxes, Vi launch_kernel(kernel, policy, decoded_bboxes, locations, priors, transpose_location, normalized_bbox, num_loc_classes, background_class_id, clip_width, clip_height); } -template static +template static typename std::enable_if ::type dispatch_decode_bboxes(int selector, Args&& ...args) { if(selector == 0) launch_decode_boxes_kernel(std::forward(args)...); } -template static +template static typename std::enable_if ::type dispatch_decode_bboxes(int selector, Args&& ...args) { if(selector == current) - launch_decode_boxes_kernel(std::forward(args)...); + launch_decode_boxes_kernel(current & 8), + static_cast(current & 4), + static_cast(current & 2), + static_cast(current & 1)>(std::forward(args)...); else dispatch_decode_bboxes(selector, std::forward(args)...); } diff --git a/modules/dnn/test/test_onnx_importer.cpp b/modules/dnn/test/test_onnx_importer.cpp index 22a45286d6..d7f68c7606 100644 --- a/modules/dnn/test/test_onnx_importer.cpp +++ b/modules/dnn/test/test_onnx_importer.cpp @@ -120,6 +120,9 @@ TEST_P(Test_ONNX_layers, Convolution_variable_weight) backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019) && target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); + if (backend == DNN_BACKEND_CUDA) + applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA); // not supported + String basename = "conv_variable_w"; Net net = readNetFromONNX(_tf("models/" + basename + ".onnx")); ASSERT_FALSE(net.empty()); @@ -147,6 +150,9 @@ TEST_P(Test_ONNX_layers, Convolution_variable_weight_bias) backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019) && target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); + if (backend == DNN_BACKEND_CUDA) + applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA); // not supported + String basename = "conv_variable_wb"; Net net = readNetFromONNX(_tf("models/" + basename + ".onnx")); ASSERT_FALSE(net.empty());