Skip to content

Commit 8e7700d

Browse files
committed
use enqueue_ndrange_kernel
1 parent 98c6571 commit 8e7700d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,16 +5123,7 @@ static void ggml_cl_conv_2d(ggml_backend_t backend, const ggml_tensor * src0, co
51235123
size_t global_work_size[] = { (size_t)NB_K * WG_K, (size_t)NB_NPQ * WG_NPQ, 1 };
51245124
size_t local_work_size[] = { (size_t)WG_K, (size_t)WG_NPQ, 1 };
51255125

5126-
#ifdef GGML_OPENCL_PROFILING
5127-
cl_event evt;
5128-
CL_CHECK(clEnqueueNDRangeKernel(backend_ctx->queue, kernel, 2, NULL, global_work_size, local_work_size, 0, NULL, &evt));
5129-
5130-
backend_ctx->profiling_info.emplace_back();
5131-
populateProfilingInfo(backend_ctx->profiling_info.back(), evt, kernel, 2, global_work_size, local_work_size, dst);
5132-
#else
5133-
GGML_UNUSED(dst);
5134-
CL_CHECK(clEnqueueNDRangeKernel(backend_ctx->queue, kernel, 2, NULL, global_work_size, local_work_size, 0, NULL, NULL));
5135-
#endif
5126+
backend_ctx->enqueue_ndrange_kernel(kernel, 2, global_work_size, local_work_size, dst);
51365127
}
51375128

51385129
static void ggml_cl_mul_mat(ggml_backend_t backend, const ggml_tensor * src0, const ggml_tensor * src1, ggml_tensor * dst) {

0 commit comments

Comments
 (0)