• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / dpnp / 28812537840
78%

Build:
DEFAULT BRANCH: master
Ran 06 Jul 2026 07:13PM UTC
Jobs 1
Files 258
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jul 2026 06:02PM UTC coverage: 78.11%. Remained the same
28812537840

push

github

web-flow
Return Python array API compatible device objects from inspection namespace (#2979)

The array API inspection namespace (`__array_namespace_info__()`)
returned raw `dpctl.SyclDevice` objects from `devices()` and
`default_device()`, while an array's `.device` attribute is a
`dpnp.tensor.Device` wrapper.

Because `Device.__eq__` does not consider a bare `SyclDevice` equal, the
objects returned by the inspection API did **not** compare equal to
`x.device`, which the Python array API standard requires:
```python
import dpnp as np

devices = np.__array_namespace_info__().devices()
devices
# Out:
# (<dpctl.SyclDevice [backend_type.level_zero, device_type.gpu,  Intel(R) Graphics [0x7d41]] at 0x74bb28198030>,
#  <dpctl.SyclDevice [backend_type.opencl, device_type.cpu,  Intel(R) Core(TM) Ultra 7 265U] at 0x74bb28198d30>,
#  <dpctl.SyclDevice [backend_type.opencl, device_type.gpu,  Intel(R) Graphics [0x7d41]] at 0x74bb2a117870>)

x = np.ones(10)
y = np.from_dlpack(x, device=devices[1])
y.device == devices[1]
# Out: False

y.device.sycl_device == devices[1]
# Out: True
```

## Changes

This PR updates `Info.devices()` to return a **tuple** of
`dpnp.tensor.Device` wrappers (built via `Device.create_device`),
instead of a list of raw `dpctl.SyclDevice` objects. The wrappers carry
the default cached queues for each root device, which is sufficient for
the common cases.

Additionally `Info.default_device()` likewise now returns a `Device`
wrapper for consistency, so `x.device`, `default_device()`, and the
elements of `devices()` all compare equal for the default device.

1532 of 2854 branches covered (53.68%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

25994 of 32386 relevant lines covered (80.26%)

8017.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28812537840.1 06 Jul 2026 07:13PM UTC 258
78.11
GitHub Action Run
Source Files on build 28812537840
  • Tree
  • List 258
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28812537840
  • 576a07b9 on github
  • Prev Build on master (#28802555904)
  • Next Build on master (#28823603391)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc