Skip to content

Commit 6818e6b

Browse files
simon886212ubuntu
authored andcommitted
opencl : fix profile-related errors (ggml-org#12095)
Co-authored-by: ubuntu <[email protected]>
1 parent 5cf167a commit 6818e6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/ggml-opencl/ggml-opencl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
278278

279279
cl_int err;
280280

281-
#ifdef GGML_PROFILE_OPENCL
281+
#ifdef GGML_OPENCL_PROFILING
282282
GGML_LOG_INFO("ggml_opencl: OpenCL profiling enabled\n");
283283
#endif
284284

@@ -3023,6 +3023,7 @@ static void ggml_cl_mul_mat(ggml_backend_t backend, const ggml_tensor * src0, co
30233023
// enqueue kernel with profiling
30243024
// <--------------------------------------------> //
30253025
#ifdef GGML_OPENCL_PROFILING
3026+
cl_event evt;
30263027
CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 3, NULL, global_work_size, local_work_size, 0, NULL, &evt));
30273028

30283029
g_profiling_info.emplace_back();

0 commit comments

Comments
 (0)