Skip to content

Tell GPUCompiler which driver consumes the SPIR-V - #504

Merged
maleadt merged 1 commit into
mainfrom
tb/intel-insertvalue
Sep 26, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/intel-insertvalue

Conversation

@maleadt

@maleadt maleadt commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Fixes #502.

Intel's graphics compiler drops struct fields when storing aggregates built by nested insertvalues. For example, the Bool in FlagFirst(flag, (a, b)) is lost, and so is the flag in (Bool, value) reduction tuples. The cause is a bug in IGC's TypesLegalizationPass (intel/intel-graphics-compiler#378). Our SPIR-V is valid.

JuliaGPU/GPUCompiler.jl#953 works around this by flattening nested insertvalues when SPIRVCompilerTarget(; driver=:intel). This PR reports the driver (:intel for Intel GPUs only, since Intel's CPU runtime uses a different compiler; otherwise :pocl, :nvidia or :generic) and adds a regression test.

Requires GPUCompiler 2.9, which includes JuliaGPU/GPUCompiler.jl#953.

With it, the full test suite passes on an Iris Xe (NEO 26.18, IGC 2.34), including the new test.

This lets GPUCompiler work around driver bugs, like Intel's graphics compiler
dropping struct fields when storing aggregates built by nested insertvalues (#502).
@maleadt
maleadt force-pushed the tb/intel-insertvalue branch from 3e0d880 to 16abfe1 Compare September 26, 2026 13:04
@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.12%. Comparing base (57e2c81) to head (16abfe1).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/compilation.jl 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #504      +/-   ##
==========================================
- Coverage   83.34%   83.12%   -0.22%     
==========================================
  Files          19       19              
  Lines        1603     1612       +9     
==========================================
+ Hits         1336     1340       +4     
- Misses        267      272       +5     

☔ 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 0e359d4 into main Sep 26, 2026
15 checks passed
@maleadt
maleadt deleted the tb/intel-insertvalue branch September 26, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intel's OpenCL driver (NEO) stores a wrong Bool field in a struct followed by a tuple

1 participant