dnn(ocl4dnn/conv): bailout on missing kernel configuration

pull/10036/head
Alexander Alekhin 7 years ago
parent 981009ac1f
commit 97181a90ba
  1. 2
      modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp

@ -379,6 +379,8 @@ bool OCL4DNNConvSpatial<Dtype>::Forward(const UMat& bottom,
{ {
num_ = numImages; num_ = numImages;
prepareKernel(bottom, top, weight, bias, numImages); prepareKernel(bottom, top, weight, bias, numImages);
if (bestKernelConfig.empty())
return false;
return convolve(bottom, top, weight, bias, numImages, bestKernelConfig, cv::ocl::Queue::getDefault()); return convolve(bottom, top, weight, bias, numImages, bestKernelConfig, cv::ocl::Queue::getDefault());
} }

Loading…
Cancel
Save