Skip to content

Test that kernels don't contain invalid integer widths - #715

Merged
maleadt merged 1 commit into
mainfrom
tb/native-int-widths
Oct 25, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/native-int-widths

Conversation

@maleadt

@maleadt maleadt commented Oct 19, 2026

Copy link
Copy Markdown
Member

Regression test for #172, which GPUCompiler fixes in JuliaGPU/GPUCompiler.jl#1027. GPUCompiler's SPIR-V datalayout declared no native integer widths, so InstCombine narrowed values to widths like i2 (a switch on x & 3) or i63 (complex x^x). The Khronos translator, used under ONEAPI_LTS, segfaults on those. With the fix, these kernels compile on both back-ends, so this also stops skipping complex x^x under LTS.

Draft until GPUCompiler 2.15.2 is released; the compat bump requires it.

Fixes #172.

@maleadt maleadt added kernels Writing and compiling kernels: device intrinsics, codegen, KernelAbstractions back-end. ci CI infrastructure, flaky tests, the test suite. labels Oct 19, 2026
@maleadt
maleadt marked this pull request as ready for review October 25, 2026 13:29
GPUCompiler 2.15.2 declares native integer widths in the SPIR-V
datalayout, so InstCombine no longer narrows values to widths like i2 or
i63 that the Khronos translator crashes on. Add a regression test for
the switch from #172 and stop skipping `x^x` on complex numbers under LTS.

Fixes #172.
@maleadt
maleadt force-pushed the tb/native-int-widths branch from 66e7144 to 8a8d4c3 Compare October 25, 2026 13:29
@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.39%. Comparing base (7e94a97) to head (8a8d4c3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #715      +/-   ##
==========================================
- Coverage   86.84%   86.39%   -0.45%     
==========================================
  Files          56       55       -1     
  Lines        5123     4983     -140     
==========================================
- Hits         4449     4305     -144     
- Misses        674      678       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit 0f73d46 into main Oct 25, 2026
5 checks passed
@maleadt
maleadt deleted the tb/native-int-widths branch October 25, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI infrastructure, flaky tests, the test suite. kernels Writing and compiling kernels: device intrinsics, codegen, KernelAbstractions back-end.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid bit width in input

1 participant