Julia 1.14 compatibility for the POCL back-end - #796
Merged
Merged
Conversation
Follow GPUCompiler's commit message tags, and skip the back-end tests on draft pull requests unless selected explicitly, to save CI resources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Float16/Float32 randn/randexp overlays @invoke Random's AbstractFloat fallback with a Type{<:AbstractFloat} annotation, which builds a UnionAll when the kernel runs. Julia 1.14 no longer folds such freshly constructed types to constants (JuliaLang/julia#62001), so the kernel ended up calling jl_type_unionall and failed to compile. Hoist the signature into a constant.
Julia 1.14 reports indexed bounds errors through Base._throw_boundserror_indices instead of throw_boundserror, so the existing override no longer applied and out-of-bounds accesses lost their error message. Mirror the override Metal.jl already has.
vchuravy
approved these changes
Sep 25, 2026
Julia 1.14 specializes type-valued arguments on `Core.TypeEgal{T}`
(JuliaLang/julia#62001), so a broadcast of a type constructor has
`TypeEgal{T}` as its function type parameter. That isn't matched by
the `Type{T}` in our adaptor rule, which replaces the non-isbits type
with a closure, making such broadcasts fail to compile. Match any
subtype of `Type{T}` instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It returns a different sampler than the host method, so it must not be defined as a consistent overlay, as SPIRVIntrinsics' `@device_override` will do (JuliaGPU/OpenCL.jl): concrete evaluation would then substitute the host result, which our overlaid `rand` methods cannot handle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Benchmark ResultsShow table
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
LinearAlgebra's `det` of triangular matrices now reduces with `Base.Fix1(convert, T)`, which isn't isbits (JuliaLang/LinearAlgebra.jl#1658). Convert `Fix1` and `Fix2` capturing a type into closures that carry the type as a parameter instead, like we already do for broadcasting types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maleadt
force-pushed
the
tb/julia-1.14
branch
from
September 25, 2026 16:17
b9f15cc to
d812fbc
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #796 +/- ##
==========================================
- Coverage 66.88% 63.34% -3.54%
==========================================
Files 24 24
Lines 2023 2136 +113
==========================================
Hits 1353 1353
- Misses 670 783 +113 ☔ 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.
On main, the nightly jobs abort with `LLVM ERROR: Broken module found`. They're green only because of `continue-on-error`.
--trimcompatibility forBoundsErrorJuliaLang/julia#61561), which bypassed the `throw_boundserror` override and lost the error message (`test/codegen_checks.jl`). Added the same override Metal.jl has.Core.TypeEgal{T}(type system: Add TypeEgal kind JuliaLang/julia#62001), which the POCLBroadcasted{…, Type{T}}adaptor rule didn't match. It now matches<:Type{T}.detnow reduces withBase.Fix1(convert, T)(Check that matrix is square indettriangular fast-path JuliaLang/LinearAlgebra.jl#1658), which isn't isbits.Fix1/Fix2capturing a type are converted to closures.Random.Sampleroverride: kept a plain overlay. SPIRVIntrinsics'@device_overridebecomes a consistent overlay in Julia 1.14 compatibility OpenCL.jl#505, and this override returns a different sampler than the host method.The full test suite passes locally (also against the SPIRVIntrinsics from JuliaGPU/OpenCL.jl#505) on 1.10, 1.12, 1.13 and nightly (1.14.0-DEV.3363), on macOS arm64 with pocl.