diff --git a/modules/ocl/src/hog.cpp b/modules/ocl/src/hog.cpp index 9c8f315ec5..ae74ed59d1 100644 --- a/modules/ocl/src/hog.cpp +++ b/modules/ocl/src/hog.cpp @@ -1578,7 +1578,8 @@ static void openCLExecuteKernel_hog(Context *clCxt , const char **source, string size_t globalThreads[3], size_t localThreads[3], vector< pair > &args) { - size_t wave_size = queryDeviceInfo(); + cl_kernel kernel = openCLGetKernelFromSource(clCxt, source, kernelName); + size_t wave_size = queryDeviceInfo(kernel); if (wave_size <= 16) { char build_options[64];