From: simon886212 Date: Thu, 6 Mar 2025 01:30:05 +0000 (+0800) Subject: opencl : fix profile-related errors (llama/12095) X-Git-Tag: upstream/1.7.4+203~10 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=bc8cb97e0283e3f43af70d165db83b4ed2790589;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp opencl : fix profile-related errors (llama/12095) Co-authored-by: ubuntu --- diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp index dc9a718f..9a76da43 100644 --- a/ggml/src/ggml-opencl/ggml-opencl.cpp +++ b/ggml/src/ggml-opencl/ggml-opencl.cpp @@ -278,7 +278,7 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) { cl_int err; -#ifdef GGML_PROFILE_OPENCL +#ifdef GGML_OPENCL_PROFILING GGML_LOG_INFO("ggml_opencl: OpenCL profiling enabled\n"); #endif @@ -3023,6 +3023,7 @@ static void ggml_cl_mul_mat(ggml_backend_t backend, const ggml_tensor * src0, co // enqueue kernel with profiling // <--------------------------------------------> // #ifdef GGML_OPENCL_PROFILING + cl_event evt; CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 3, NULL, global_work_size, local_work_size, 0, NULL, &evt)); g_profiling_info.emplace_back();