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

IntelPython / dpnp / 33077063400
78%

Build:
DEFAULT BRANCH: master
Ran 27 Aug 2026 03:09PM 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

27 Aug 2026 01:29PM UTC coverage: 78.483%. Remained the same
33077063400

push

github

web-flow
Wrap out-of-range float-to-integer astype casts to match NumPy (#3033)

Casting an out-of-range floating-point value to an integer type is
undefined behavior in C++. SYCL devices resolve it by saturating to the
destination's min/max, whereas NumPy emits a plain C cast that, for
narrow integer targets, truncates toward zero and wraps modulo the
destination width (e.g. `float32(128)` becomes `int8(-128)`).

`convert_impl` (used by `astype` and every copy-and-cast kernel) only
normalized this to NumPy's wrapping behavior for *unsigned*
destinations. Signed narrow integer targets fell through to a raw
`static_cast` and therefore *saturated* on device, diverging from NumPy.
The same inconsistency showed up within a single operation:
`dpnp.tensor.linalg.trace` with an `int8` output dtype produced
different results depending on whether the value went through the
element-wise `astype` path (saturated) or the reduction path (wrapped).

This PR generalizes the float-to-integer branch of `convert_impl` to
funnel every conversion through a wider signed integer, relying on the
well-defined integer narrowing to perform the modular wrap for both
signed and unsigned narrow integer targets. 64-bit destinations keep
their existing handling (unsigned routes negatives through `int64`;
signed casts directly).

1546 of 2898 branches covered (53.35%)

Branch coverage included in aggregate %.

26583 of 32943 relevant lines covered (80.69%)

8496.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33077063400.1 27 Aug 2026 03:09PM UTC 263
78.48
GitHub Action Run
Source Files on build 33077063400
  • Tree
  • List 263
  • 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 #33077063400
  • 7e0f238a on github
  • Prev Build on master (#32990583409)
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