Skip to content

Commit d6a0dcb

Browse files
committed
added more logging
1 parent 37455db commit d6a0dcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,17 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
309309
unsigned n_devices = 0;
310310
struct cl_device * default_device = NULL;
311311

312+
GGML_LOG_INFO("ggml_opencl: getting opencl platform IDs...\n");
313+
312314
cl_platform_id platform_ids[NPLAT];
313315
auto clGetPlatformIDResult = clGetPlatformIDs(NPLAT, platform_ids, &n_platforms);
314316
if (clGetPlatformIDResult != CL_SUCCESS) {
315-
GGML_LOG_ERROR("ggml_opencl: plaform IDs not available.\n");
317+
GGML_LOG_ERROR("ggml_opencl: platform IDs not available: %d.\n", clGetPlatformIDResult);
316318
return backend_ctx;
317319
}
318320

321+
GGML_LOG_INFO("ggml_opencl: found %d platforms", n_platforms);
322+
319323
for (unsigned i = 0; i < n_platforms; i++) {
320324
struct cl_platform * p = &platforms[i];
321325
p->number = i;

0 commit comments

Comments
 (0)