Skip to content

SyclDeviceCreationError: Default device is unavailable. when attempting to use dpnp 0.18.1 on google colab #2617

@ogrisel

Description

@ogrisel

Steps to reproduce:

  • Open a new colab notebook
  • Check the CPU architecture with !lscpu
  • Output of lscpu:
Architecture:                x86_64
  CPU op-mode(s):            32-bit, 64-bit
  Address sizes:             46 bits physical, 48 bits virtual
  Byte Order:                Little Endian
CPU(s):                      2
  On-line CPU(s) list:       0,1
Vendor ID:                   GenuineIntel
  Model name:                Intel(R) Xeon(R) CPU @ 2.20GHz
    CPU family:              6
    Model:                   79
    Thread(s) per core:      2
    Core(s) per socket:      1
    Socket(s):               1
    Stepping:                0
    BogoMIPS:                4400.39
    Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pg
                             e mca cmov pat pse36 clflush mmx fxsr sse sse2 ss h
                             t syscall nx pdpe1gb rdtscp lm constant_tsc rep_goo
                             d nopl xtopology nonstop_tsc cpuid tsc_known_freq p
                             ni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2ap
                             ic movbe popcnt aes xsave avx f16c rdrand hyperviso
                             r lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fs
                             gsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invp
                             cid rtm rdseed adx smap xsaveopt arat md_clear arch
                             _capabilities
Virtualization features:     
  Hypervisor vendor:         KVM
  Virtualization type:       full
Caches (sum of all):         
  L1d:                       32 KiB (1 instance)
  L1i:                       32 KiB (1 instance)
  L2:                        256 KiB (1 instance)
  L3:                        55 MiB (1 instance)
NUMA:                        
  NUMA node(s):              1
  NUMA node0 CPU(s):         0,1
Vulnerabilities:             
  Gather data sampling:      Not affected
  Indirect target selection: Vulnerable
  Itlb multihit:             Not affected
  L1tf:                      Mitigation; PTE Inversion
  Mds:                       Vulnerable; SMT Host state unknown
  Meltdown:                  Vulnerable
  Mmio stale data:           Vulnerable
  Reg file data sampling:    Not affected
  Retbleed:                  Vulnerable
  Spec rstack overflow:      Not affected
  Spec store bypass:         Vulnerable
  Spectre v1:                Vulnerable: __user pointer sanitization and usercop
                             y barriers only; no swapgs barriers
  Spectre v2:                Vulnerable; IBPB: disabled; STIBP: disabled; PBRSB-
                             eIBRS: Not affected; BHI: Vulnerable
  Srbds:                     Not affected
  Tsa:                       Not affected
  Tsx async abort:           Vulnerable
  • Install dpnp %pip install --index-url https://software.repos.intel.com/python/pypi dpnp
  • Installed versions:
Successfully installed dpcpp-cpp-rt-2025.2.0 dpctl-0.20.2 dpnp-0.18.1 intel-cmplr-lib-rt-2025.2.0 intel-cmplr-lib-ur-2025.2.0 intel-cmplr-lic-rt-2025.2.0 intel-opencl-rt-2025.2.0 intel-openmp-2025.2.0 intel-sycl-rt-2025.2.0 onemkl-sycl-blas-2025.2.0 onemkl-sycl-dft-2025.2.0 onemkl-sycl-lapack-2025.2.0 onemkl-sycl-rng-2025.2.0 onemkl-sycl-stats-2025.2.0 onemkl-sycl-vm-2025.2.0
  • Attempt to use it with the default device (e.g. import dpnp; dpnp.ones(3))

  • Get the following SyclDeviceCreationError: Default device is unavailable.

  • Full traceback:

---------------------------------------------------------------------------
SyclDeviceCreationError                   Traceback (most recent call last)
[/tmp/ipython-input-2008473604.py](https://github.com/IntelPython/dpnp/issues/new#) in <cell line: 0>()
      1 import dpnp
      2 
----> 3 dpnp.ones(3)

4 frames[/usr/local/lib/python3.12/dist-packages/dpnp/dpnp_iface_arraycreation.py](https://github.com/IntelPython/dpnp/issues/new#) in ones(shape, dtype, order, like, device, usm_type, sycl_queue)
   3414         usm_type = "device"
   3415 
-> 3416     return dpnp_container.ones(
   3417         shape,
   3418         dtype=dtype,

[/usr/local/lib/python3.12/dist-packages/dpnp/dpnp_container.py](https://github.com/IntelPython/dpnp/issues/new#) in ones(shape, dtype, order, device, usm_type, sycl_queue)
    250     """Validate input parameters before passing them into `dpctl.tensor` module"""
    251     dpu.validate_usm_type(usm_type, allow_none=False)
--> 252     sycl_queue_normalized = dpnp.get_normalized_queue_device(
    253         sycl_queue=sycl_queue, device=device
    254     )

[/usr/local/lib/python3.12/dist-packages/dpnp/dpnp_iface.py](https://github.com/IntelPython/dpnp/issues/new#) in get_normalized_queue_device(obj, device, sycl_queue)
    560         sycl_queue = obj.sycl_queue
    561 
--> 562     return normalize_queue_device(sycl_queue=sycl_queue, device=device)
    563 
    564 

[/usr/local/lib/python3.12/dist-packages/dpctl/tensor/_device.py](https://github.com/IntelPython/dpnp/issues/new#) in normalize_queue_device(sycl_queue, device)
    170     d = device
    171     if q is None:
--> 172         d = Device.create_device(d)
    173         return d.sycl_queue
    174     if not isinstance(q, dpctl.SyclQueue):

[/usr/local/lib/python3.12/dist-packages/dpctl/tensor/_device.py](https://github.com/IntelPython/dpnp/issues/new#) in create_device(cls, device)
     75         else:
     76             if dev is None:
---> 77                 _dev = _cached_default_device()
     78             else:
     79                 _dev = dpctl.SyclDevice(dev)

dpctl/_sycl_device_factory.pyx in dpctl._sycl_device_factory._cached_default_device()

dpctl/_sycl_device_factory.pyx in dpctl._sycl_device_factory._cached_default_device()

dpctl/_sycl_device_factory.pyx in dpctl._sycl_device_factory._DefaultDeviceCache.get_or_create()

dpctl/_sycl_device_factory.pyx in dpctl._sycl_device_factory.select_default_device()

SyclDeviceCreationError: Default device is unavailable.
  • link to reproducer:

https://colab.research.google.com/drive/1nj576i49MDq3Ts_4oshz_BP48AAaRTdp?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions