Use GPUCompiler's workaround for nested insertvalues - #646
Merged
Merged
Conversation
GPUCompiler now flattens nested insertvalues when targeting Intel's driver, so identify the driver and drop our copy of that pass.
maleadt
force-pushed
the
tb/gpucompiler-intel-driver
branch
from
September 26, 2026 06:28
1737c7c to
c339a3e
Compare
maleadt
marked this pull request as ready for review
September 26, 2026 06:29
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/compiler/compilation.jl b/src/compiler/compilation.jl
index 8f46310..4e6073c 100644
--- a/src/compiler/compilation.jl
+++ b/src/compiler/compilation.jl
@@ -309,8 +309,10 @@ end
extensions_str = join(map(ext -> "+$ext", extensions), ",")
# create GPUCompiler objects
- target = SPIRVCompilerTarget(; backend, extensions = extensions_str, supports_fp16, supports_fp64, supports_bfloat16,
- driver = :intel, kwargs...)
+ target = SPIRVCompilerTarget(;
+ backend, extensions = extensions_str, supports_fp16, supports_fp64, supports_bfloat16,
+ driver = :intel, kwargs...
+ )
params = oneAPICompilerParams()
CompilerConfig(target, params; kernel, name, always_inline)
end |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #646 +/- ##
==========================================
- Coverage 80.79% 80.61% -0.18%
==========================================
Files 55 55
Lines 4087 4034 -53
==========================================
- Hits 3302 3252 -50
+ Misses 785 782 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JuliaGPU/GPUCompiler.jl#953 moves the nested-
insertvalueworkaround from #548 into GPUCompiler. It is enabled withSPIRVCompilerTarget(; driver=:intel), so this PR passes that and drops our own copy of the pass. The #259 test stays.The root cause is now known: IGC's
TypesLegalizationPasssilently drops the store of a field when an aggregate is built by nestedinsertvalues (intel/intel-graphics-compiler#378, JuliaGPU/OpenCL.jl#502). GPUCompiler runs the pass from within its SPIR-Vfinish_ir!, before the kernel state and byval rewrites, rather than after them as here.Requires GPUCompiler 2.9, which includes JuliaGPU/GPUCompiler.jl#953.