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

IntelPython / dpnp / 42674140598
84%

Build:
DEFAULT BRANCH: master
Ran 09 Nov 2026 07:48PM UTC
Jobs 1
Files 265
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

09 Nov 2026 06:27PM UTC coverage: 84.423% (+0.02%) from 84.407%
42674140598

push

github

web-flow
Drop the unreachable default-context fallbacks in `dpnp.tensor` DLPack (#3175)

`to_dlpack_capsule` (through `get_array_dlpack_device_id`) and
`from_dlpack_capsule` in `dpnp/tensor/_dlpack.pyx` wrap
`SyclPlatform.default_context` in `try`/`except RuntimeError`, with a
fallback for a runtime that doesn't support default contexts: the export
then only rejects sub-devices, and the import uses the context of the
device's cached queue.

The fallbacks are never reached. Since dpctl 0.17.0
(IntelPython/dpctl@e53b1fde19), `SyclPlatform.default_context` raises
`dpctl.SyclContextCreationError` when the default context is
unavailable, and that class derives from `Exception`, not
`RuntimeError`. So the `except` clauses don't catch that case: the error
has gone straight to the caller in every dpctl version dpnp supports
(`dpctl>=0.20.0`). The only `RuntimeError` they could catch comes from
`SyclDevice.sycl_platform` for a device without a platform, which a
constructed `SyclDevice` never hits. Separately, DPC++ 2026.2 returns a
default context on every platform, even with
`SYCL_ENABLE_DEFAULT_CONTEXTS=0` (checked on OpenCL CPU, OpenCL GPU and
Level Zero GPU).

This PR removes `_get_default_context`, the sub-device check that only
ran on the fallback path, the `try`/`except` in `from_dlpack_capsule`,
and the cimports only that code used. DLPack export and import behave as
before: arrays not bound to the platform default context, including
those on sub-devices, are still rejected by the context check.

Cythonizing the module with Cython 3.3.1 and a syntax-only compile of
the generated C++ with icpx 2026.2 pass without warnings.

1792 of 2998 branches covered (59.77%)

Branch coverage included in aggregate %.

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

1 existing line in 1 file now uncovered.

29615 of 34204 relevant lines covered (86.58%)

39086.24 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
86.68
1.14% dpnp/tensor/_dlpack.pyx
Jobs
ID Job ID Ran Files Coverage
1 42674140598.1 09 Nov 2026 07:48PM UTC 265
84.42
GitHub Action Run
Source Files on build 42674140598
  • Tree
  • List 265
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42674140598
  • 773c41db on github
  • Prev Build on master (#42653797008)
  • Next Build on master (#42691268684)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc