mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
dnn(test): run DL IE tests on Intel OpenCL devices only
This commit is contained in:
parent
e51d7cb3d8
commit
fdaeb20253
@ -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…
Reference in New Issue
Block a user