You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dpctl should better query SYCL run-times for actually available backends. #139
On a machine without CUDA card, seeting SYCL_BE=PI_CUDA is equivalent to telling SYCL to only expose default host backend.
SYCL_BE=PI_CUDA python -c "import dpctl; dpctl.dump()" shows 4 platforms available, and yet attempting to set it throws errors whose handling is to be improved:
(idp) [16:48:01 linbox work]$ SYCL_BE=PI_CUDA python -c "import dpctl; dpctl.set_default_queue('opencl', 'cpu', 0)"
active queue vector is corrupted.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "dpctl/sycl_core.pyx", line 721, in dpctl._sycl_core._SyclRTManager.set_default_queue
AttributeError: 'dpctl._sycl_core._SyclRTManager' object has no attribute '_raise_queue_creation_error'
set_default_queue is now set_global_queue, and even this could change (can be removed in not so distance future), but it now works correctly:
(idp) [18:33:29 nuc04 dpctl]$ SYCL_DEVICE_FILTER=cuda python -c "import dpctl; dpctl.set_global_queue('opencl:cpu:0')"
Could not find a device that matches the specified filter(s)! -1 (CL_DEVICE_NOT_FOUND)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "dpctl/_sycl_queue_manager.pyx", line 157, in dpctl._sycl_queue_manager._SyclQueueManager.set_global_queue
q_obj = SyclQueue(arg)
File "dpctl/_sycl_queue.pyx", line 233, in dpctl._sycl_queue.SyclQueue.__cinit__
raise SyclQueueCreationError(
dpctl._sycl_queue.SyclQueueCreationError: SYCL Device 'opencl:cpu:0' could not be created.
Activity
diptorupd commentedon Mar 1, 2021
@oleksandr-pavlyk Is this issue getting fixed by any of the changes we have recently made to device manager and queue manager?
oleksandr-pavlyk commentedon Apr 5, 2021
set_default_queueis nowset_global_queue, and even this could change (can be removed in not so distance future), but it now works correctly: