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

IntelPython / dpnp / 31689450687
78%

Build:
DEFAULT BRANCH: master
Ran 13 Aug 2026 11:30AM UTC
Jobs 1
Files 263
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

13 Aug 2026 10:04AM UTC coverage: 78.415% (+0.003%) from 78.412%
31689450687

push

github

web-flow
Fix abort in `top_k` for k=0 (#3022)

`dpnp.tensor.top_k(x, 0)` might aborted the process on an
assertions-enabled SYCL runtime:

```python
import dpnp.tensor as dpt
dpt.top_k(dpt.arange(12).reshape(3, 4), 0)   # k = 0
```

`k == 0` is a valid request whose result is empty, and it passes
validation (`k < 0` is rejected, `k > size` is rejected, but `k == 0` is
allowed). `py_topk` then dispatched to the kernel, whose output-writing
step (`write_out_impl`) builds an `nd_range` from `nelems = iter_nelems
* k`. A zero-sized `nd_range` is a silent no-op on runtimes built with
`NDEBUG`, but aborts on an assertions-enabled SYCL runtime.

The existing guard covered `iter_nelems == 0` and `axis_nelems == 0`,
but not `k == 0`.

This PR proposes to extend the early-return guard in `py_topk` to also
cover `k == 0`.

1546 of 2884 branches covered (53.61%)

Branch coverage included in aggregate %.

26489 of 32868 relevant lines covered (80.59%)

7893.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31689450687.1 13 Aug 2026 11:30AM UTC 263
78.42
GitHub Action Run
Source Files on build 31689450687
  • Tree
  • List 263
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #31689450687
  • 9b62c276 on github
  • Prev Build on master (#31575799116)
  • Next Build on master (#31735343730)
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