dnn(test): skip failed tests on Vulkan backend

pull/21282/head
Alexander Alekhin 3 years ago
parent 622b9d9276
commit 249c508126
  1. 10
      modules/dnn/test/test_misc.cpp
  2. 27
      modules/dnn/test/test_onnx_importer.cpp
  3. 6
      modules/dnn/test/test_tf_importer.cpp

@ -842,6 +842,12 @@ TEST_P(Test_two_inputs, basic)
Backend backendId = get<0>(get<2>(GetParam())); Backend backendId = get<0>(get<2>(GetParam()));
Target targetId = get<1>(get<2>(GetParam())); Target targetId = get<1>(get<2>(GetParam()));
int type1 = get<0>(GetParam());
int type2 = get<1>(GetParam());
if (backendId == DNN_BACKEND_VKCOM && !(type1 == CV_32F && type2 == CV_32F))
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
Net net; Net net;
LayerParams lp; LayerParams lp;
lp.type = "Eltwise"; lp.type = "Eltwise";
@ -851,8 +857,8 @@ TEST_P(Test_two_inputs, basic)
net.connect(0, 1, eltwiseId, 1); // connect to a second input net.connect(0, 1, eltwiseId, 1); // connect to a second input
int inpSize[] = {1, 2, 3, 4}; int inpSize[] = {1, 2, 3, 4};
Mat firstInp(4, &inpSize[0], get<0>(GetParam())); Mat firstInp(4, &inpSize[0], type1);
Mat secondInp(4, &inpSize[0], get<1>(GetParam())); Mat secondInp(4, &inpSize[0], type2);
randu(firstInp, 0, 100); randu(firstInp, 0, 100);
randu(secondInp, 0, 100); randu(secondInp, 0, 100);

@ -242,6 +242,9 @@ TEST_P(Test_ONNX_layers, Deconvolution3D)
if (backend == DNN_BACKEND_OPENCV) if (backend == DNN_BACKEND_OPENCV)
throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("deconv3d"); testONNXModels("deconv3d");
} }
@ -260,6 +263,9 @@ TEST_P(Test_ONNX_layers, Deconvolution3D_bias)
if (backend == DNN_BACKEND_OPENCV) if (backend == DNN_BACKEND_OPENCV)
throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("deconv3d_bias"); testONNXModels("deconv3d_bias");
} }
@ -278,6 +284,9 @@ TEST_P(Test_ONNX_layers, Deconvolution3D_pad)
if (backend == DNN_BACKEND_OPENCV) if (backend == DNN_BACKEND_OPENCV)
throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("deconv3d_pad"); testONNXModels("deconv3d_pad");
} }
@ -296,6 +305,9 @@ TEST_P(Test_ONNX_layers, Deconvolution3D_adjpad)
if (backend == DNN_BACKEND_OPENCV) if (backend == DNN_BACKEND_OPENCV)
throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags throw SkipTestException("OpenCV backend is not supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("deconv3d_adjpad"); testONNXModels("deconv3d_adjpad");
} }
@ -384,6 +396,9 @@ TEST_P(Test_ONNX_layers, ReduceMean3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("reduce_mean3d"); testONNXModels("reduce_mean3d");
} }
@ -671,6 +686,9 @@ TEST_P(Test_ONNX_layers, MaxPooling3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("max_pool3d", npy, 0, 0, false, false); testONNXModels("max_pool3d", npy, 0, 0, false, false);
} }
@ -685,6 +703,9 @@ TEST_P(Test_ONNX_layers, AvePooling3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("ave_pool3d"); testONNXModels("ave_pool3d");
} }
@ -699,6 +720,9 @@ TEST_P(Test_ONNX_layers, PoolConv3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
testONNXModels("pool_conv_3d"); testONNXModels("pool_conv_3d");
} }
@ -1777,6 +1801,9 @@ TEST_P(Test_ONNX_nets, Resnet34_kinetics)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
String onnxmodel = findDataFile("dnn/resnet-34_kinetics.onnx", false); String onnxmodel = findDataFile("dnn/resnet-34_kinetics.onnx", false);
Mat image0 = imread(findDataFile("dnn/dog416.png")); Mat image0 = imread(findDataFile("dnn/dog416.png"));
Mat image1 = imread(findDataFile("dnn/street.png")); Mat image1 = imread(findDataFile("dnn/street.png"));

@ -627,6 +627,9 @@ TEST_P(Test_TensorFlow_layers, MaxPooling3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
runTensorFlowNet("max_pool3d"); runTensorFlowNet("max_pool3d");
} }
@ -641,6 +644,9 @@ TEST_P(Test_TensorFlow_layers, AvePooling3D)
if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
throw SkipTestException("Only CPU is supported"); // FIXIT use tags throw SkipTestException("Only CPU is supported"); // FIXIT use tags
if (backend == DNN_BACKEND_VKCOM)
applyTestTag(CV_TEST_TAG_DNN_SKIP_VULKAN);
runTensorFlowNet("ave_pool3d"); runTensorFlowNet("ave_pool3d");
} }

Loading…
Cancel
Save