diff options
author | Maarten ter Huurne <maarten@treewalker.org> | 2023-05-23 18:01:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 19:01:15 +0300 |
commit | 7d873811f31d4d8c909015c946a862c0089cda7d (patch) | |
tree | ffd6648ae17a5a92ad0b48b085bf4cbc7f8a5891 | |
parent | 2e6cd4b02549e343bef3768e6b946f999c82e823 (diff) |
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.
-rw-r--r-- | ggml-opencl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ggml-opencl.cpp b/ggml-opencl.cpp index fb007dd..667f55e 100644 --- a/ggml-opencl.cpp +++ b/ggml-opencl.cpp @@ -488,7 +488,7 @@ void ggml_cl_init(void) { CL_CHECK((context = clCreateContext(properties, 1, &device, NULL, NULL, &err), err)); CL_CHECK((queue = clCreateCommandQueue(context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err), - (err != CL_INVALID_PROPERTY && err != CL_INVALID_VALUE ? err : + (err != CL_INVALID_QUEUE_PROPERTIES && err != CL_INVALID_VALUE ? err : (queue = clCreateCommandQueue(context, device, 0, &err), err) ))); |