Skip to content

dpctl should better query SYCL run-times for actually available backends.  #139

Closed

Description

@oleksandr-pavlyk

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'

@diptorupd @PokhodenkoSA

Activity

  1. diptorupd commented on Mar 1, 2021

    @diptorupd
    Contributor

    @oleksandr-pavlyk Is this issue getting fixed by any of the changes we have recently made to device manager and queue manager?

  2. oleksandr-pavlyk commented on Apr 5, 2021

    @oleksandr-pavlyk
    ContributorAuthor

    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.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions