We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
has_opencl_extension
1 parent 001fd5a commit 56c47feCopy full SHA for 56c47fe
third_party/intel/backend/driver.c
@@ -366,9 +366,10 @@ extern "C" EXPORT_FUNC PyObject *wait_on_sycl_queue(PyObject *cap) {
366
367
extern "C" EXPORT_FUNC PyObject *has_opencl_extension(int device_id,
368
const char *extension) {
369
- if (device_id > sycl_opencl_device_list.size()) {
370
- std::cerr << "Device is not found " << std::endl << std::flush;
371
- return NULL;
+ if (device_id >= sycl_opencl_device_list.size()) {
+ std::cerr << "Device is not found, extension " << extension << std::endl
+ << std::flush;
372
+ Py_RETURN_FALSE;
373
}
374
const sycl::device &device = sycl_opencl_device_list[device_id];
375
0 commit comments