From 86d0a8614118dbd3fe9317403391da065a5a5c91 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 26 Mar 2021 00:32:02 +0000 Subject: [PATCH] dnn(ocl): fix gemm kernel scheduling --- modules/dnn/src/ocl4dnn/src/math_functions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dnn/src/ocl4dnn/src/math_functions.cpp b/modules/dnn/src/ocl4dnn/src/math_functions.cpp index e26a3c3f06..855a21e08f 100644 --- a/modules/dnn/src/ocl4dnn/src/math_functions.cpp +++ b/modules/dnn/src/ocl4dnn/src/math_functions.cpp @@ -112,14 +112,14 @@ ocl::Image2D ocl4dnnGEMMCopyBufferToImage(UMat buffer, int offset, global_copy[0] = padded_width; global_copy[1] = padded_height; - oclk_gemm_copy + bool res = oclk_gemm_copy .args( ocl::KernelArg::PtrReadOnly(buffer), image, offset, width, height, ld) .run(2, global_copy, NULL, false); - oclk_gemm_copy.run(2, global_copy, NULL, false); + CV_Assert(res); } }