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

IntelPython / dpnp / 45357515667
85%

Build:
DEFAULT BRANCH: master
Ran 24 Nov 2026 09:38AM UTC
Jobs 1
Files 274
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

24 Nov 2026 08:35AM UTC coverage: 84.553% (+0.008%) from 84.545%
45357515667

push

github

web-flow
Accept NULL data pointers in DLPack tensors on oneAPI devices (#3197)

This PR fixes a `TypeError` in `dpnp.tensor.from_dlpack` and
`dpnp.from_dlpack` when importing a DLPack tensor on a oneAPI device
whose data pointer is NULL.

For such a tensor, `from_dlpack_capsule` allocates a new buffer with
`dpmem.MemoryUSMDevice(sz, q)`, but `MemoryUSMDevice` takes the queue
only as a keyword, so the import raised `TypeError: __cinit__() takes
exactly 1 positional argument (2 given)`. DLPack asks for a NULL data
pointer in a tensor of size zero, so importing an empty tensor from a
producer that follows it failed. The queue is now passed by keyword, as
`_to_usm_ary_from_host_blob` in the same file already does.

dpnp's own capsules always point to an allocation, so only tensors from
other producers reach this. The `kDLCPU` branch goes through NumPy and
was not affected.

The test builds such tensors with the `_dlpack_ctypes` helper added in
#3181, so this PR is stacked on #3181 and targets its branch; it is to
be retargeted to `master` once #3181 is merged. The test checks that the
import returns an empty array on the producer's device and that the
deleter is called once. Without the fix, both cases of the new test fail
with the `TypeError`.

1906 of 3156 branches covered (60.39%)

Branch coverage included in aggregate %.

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

30805 of 35531 relevant lines covered (86.7%)

39370.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45357515667.1 24 Nov 2026 09:38AM UTC 274
84.55
GitHub Action Run
Source Files on build 45357515667
  • Tree
  • List 274
  • 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 #45357515667
  • e3697fb9 on github
  • Prev Build on master (#45230993784)
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