Merge pull request #12524 from alalek:fix_dnn_skx_dlie

This commit is contained in:
Alexander Alekhin 2018-09-13 20:56:31 +00:00
commit 949d7d7d25
2 changed files with 18 additions and 2 deletions

View File

@ -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));

View File

@ -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()
));
}}