dnn(test): run DL IE tests on Intel OpenCL devices only

pull/12524/head
Alexander Alekhin 6 years ago
parent e51d7cb3d8
commit fdaeb20253
  1. 2
      modules/dnn/test/test_common.hpp
  2. 18
      modules/dnn/test/test_ie_models.cpp

@ -257,7 +257,7 @@ static testing::internal::ParamGenerator<tuple<Backend, Target> > 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));

@ -227,8 +227,24 @@ static testing::internal::ParamGenerator<String> intelModels()
return ValuesIn(modelsNames);
}
static testing::internal::ParamGenerator<Target> dnnDLIETargets()
{
std::vector<Target> 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()
));
}}

Loading…
Cancel
Save