Skip to content

Commit 7d87381

Browse files
authored
Fix handling of "invalid property" when creating OpenCL command queue (#1565)
The `clCreateCommandQueue()` function will return the code `CL_INVALID_QUEUE_PROPERTIES` when passed unsupported properties, not `CL_INVALID_PROPERTY` as the original code was checking for.
1 parent 2e6cd4b commit 7d87381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml-opencl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void ggml_cl_init(void) {
488488
CL_CHECK((context = clCreateContext(properties, 1, &device, NULL, NULL, &err), err));
489489

490490
CL_CHECK((queue = clCreateCommandQueue(context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err),
491-
(err != CL_INVALID_PROPERTY && err != CL_INVALID_VALUE ? err :
491+
(err != CL_INVALID_QUEUE_PROPERTIES && err != CL_INVALID_VALUE ? err :
492492
(queue = clCreateCommandQueue(context, device, 0, &err), err)
493493
)));
494494

0 commit comments

Comments
 (0)