Skip to content

Julia 1.14 compatibility; CI step selection - #979

Merged
maleadt merged 7 commits into
mainfrom
tb/julia-1.14
Sep 26, 2026
Merged

maleadt merged 7 commits into
mainfrom
tb/julia-1.14

Conversation

@maleadt

@maleadt maleadt commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

On main, nightly (1.14) fails in gpuarrays/uniformscaling (jl_genericmemory_copyto in device code) and more.

  • CI: [only X]/[skip X] take comma-separated step tags, as in GPUCompiler: julia, nightly (was pre), special, validation, docs, benchmarks, and tests for all test steps. Draft PRs only test the newest release (1.13) and nightly. Older releases and the special steps run once the PR is ready. Steps share their definition through YAML anchors.
  • Consistent overlays: plain overlays taint every call that can reach them, including through error paths, which blocks concrete evaluation. Since 1.14 guards array growth with checked_add (base: Guard allocation arithmetic from overflow JuliaLang/julia#62797), that broke keyword-argument handling in kernels, e.g. range(start; step, length) in LinearAlgebra's diagind (A + I). @device_override now uses @consistent_overlay, as CUDA.jl and AMDGPU.jl do. The Random.Sampler override returns a different sampler than the host method, so it stays a plain overlay; otherwise concrete evaluation substitutes the host's SamplerRangeNDL.
  • RNG: @invoke randn(rng::AbstractRNG, T::Type{<:AbstractFloat}) built a UnionAll at run time on 1.14 (type system: Add TypeEgal kind JuliaLang/julia#62001). The signature is now a constant.
  • Type broadcasts: 1.14 specializes type arguments on Core.TypeEgal{T}, which the Broadcasted{…, Type{T}} adaptor rule didn't match, so Float32.(x) failed to compile. It now matches <:Type{T}.
  • Functions capturing a type: LinearAlgebra's triangular det now reduces with Base.Fix1(convert, T) (Check that matrix is square in det triangular fast-path JuliaLang/LinearAlgebra.jl#1658). Fix1/Fix2 capturing a type are converted to closures.
  • Argument encoding bug (latent, exposed by the previous item): the unconverted argument type decided whether an argument takes a slot. A Fix1 that converts to a ghost closure shifted every later argument, so sum(Base.Fix1(convert, Float32), x) returned 0. The slot is now decided on the converted type.

The full test suite passes locally on nightly (1.14.0-DEV.3363, M3 Pro), with JuliaGPU/GPUCompiler.jl#956 for the write-barrier fix. That's in GPUCompiler 2.9, which this PR now requires.

maleadt and others added 6 commits September 25, 2026 15:41
Adopt GPUCompiler's commit message grammar, where `[only ...]` and
`[skip ...]` take a comma-separated list of step tags, e.g. `[only
nightly]` or `[skip special, docs]`. Nightly is now selected with
`nightly` instead of `pre`. To save CI time, draft pull requests only
test the newest Julia release and nightly; older releases and the
special tests run once the pull request is marked ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plain overlays taint every call that can reach them, even through an
error path, which prevents concrete evaluation. Since Julia 1.14 guards
array growth with checked arithmetic (JuliaLang/julia#62797), this broke
keyword-argument handling in kernels, e.g. `range(start; step, length)`
as used by LinearAlgebra's `diagind`, leaving calls to `push!` in
device code. CUDA.jl and AMDGPU.jl already use consistent overlays.

The `Random.Sampler` override returns a different sampler than the host
method, so it keeps using a plain overlay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The randn/randexp overrides `@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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
Arguments are encoded before conversion, and the unconverted type decided
whether an argument occupies a slot. When conversion yields a ghost type,
e.g. for `Base.Fix1(convert, T)`, the kernel doesn't have a parameter for
it, so all subsequent arguments were passed in the wrong slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.04%. Comparing base (26c9e7d) to head (c5e5377).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/execution.jl 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #979      +/-   ##
==========================================
- Coverage   85.37%   85.04%   -0.33%     
==========================================
  Files          77       89      +12     
  Lines        5660     6387     +727     
==========================================
+ Hits         4832     5432     +600     
- Misses        828      955     +127     

☔ 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 marked this pull request as ready for review September 25, 2026 20:10
@maleadt
maleadt marked this pull request as draft September 25, 2026 20:10
@maleadt
maleadt marked this pull request as ready for review September 26, 2026 06:29
@maleadt
maleadt merged commit cac0451 into main Sep 26, 2026
14 checks passed
@maleadt
maleadt deleted the tb/julia-1.14 branch September 26, 2026 13:06
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.

1 participant