diff --git a/modules/dnn/test/test_common.hpp b/modules/dnn/test/test_common.hpp index 2df422b759..7d31d798c1 100644 --- a/modules/dnn/test/test_common.hpp +++ b/modules/dnn/test/test_common.hpp @@ -257,7 +257,7 @@ static testing::internal::ParamGenerator > dnnBackendsAnd { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_CPU)); #ifdef HAVE_OPENCL - if (cv::ocl::useOpenCL()) + if (cv::ocl::useOpenCL() && ocl::Device::getDefault().isIntel()) { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL)); targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL_FP16)); diff --git a/modules/dnn/test/test_ie_models.cpp b/modules/dnn/test/test_ie_models.cpp index 22dc1fe65f..7507ea74b6 100644 --- a/modules/dnn/test/test_ie_models.cpp +++ b/modules/dnn/test/test_ie_models.cpp @@ -227,8 +227,24 @@ static testing::internal::ParamGenerator intelModels() return ValuesIn(modelsNames); } +static testing::internal::ParamGenerator dnnDLIETargets() +{ + std::vector targets; + targets.push_back(DNN_TARGET_CPU); +#ifdef HAVE_OPENCL + if (cv::ocl::useOpenCL() && ocl::Device::getDefault().isIntel()) + { + targets.push_back(DNN_TARGET_OPENCL); + targets.push_back(DNN_TARGET_OPENCL_FP16); + } +#endif + //if (checkMyriadTarget()) + // targets.push_back(DNN_TARGET_MYRIAD); + return testing::ValuesIn(targets); +} + INSTANTIATE_TEST_CASE_P(/**/, DNNTestOpenVINO, Combine( - Values(DNN_TARGET_CPU, DNN_TARGET_OPENCL, DNN_TARGET_OPENCL_FP16), intelModels() + dnnDLIETargets(), intelModels() )); }}