From 3e9ebc74c4f09776e25535c5d1c26b772cda8af0 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sat, 17 Jan 2026 20:57:10 +0100 Subject: [PATCH 1/9] Restrict installation of incompatible LLVM_jll. --- test/Project.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index 0c5499ed..def54d1b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -18,6 +18,4 @@ demumble_jll = "1e29f10c-031c-5a83-9565-69cddfc27673" [compat] Aqua = "0.8" ParallelTestRunner = "1" - -[extras] -GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" +LLVM_jll = "15,16,18,20" From f129afb6d692b7857bda6e99628495d54d828dfc Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sat, 17 Jan 2026 20:57:22 +0100 Subject: [PATCH 2/9] Fix use of removed WorldView. --- src/jlgen.jl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index 0d380cbf..d28540c4 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -503,7 +503,9 @@ CC.method_table(interp::GPUInterpreter) = interp.method_table_view ## world view of the cache -using Core.Compiler: WorldView +@static if VERSION < v"1.14-" + using Core.Compiler: WorldView +end if !HAS_INTEGRATED_CACHE @@ -624,6 +626,16 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world) return codeinfos end +@static if VERSION >= v"1.14-" +function ci_cache_lookup(cache, mi, min_world, max_world) + # In Julia 1.14+, WorldView was replaced by InternalCodeCache with WorldRange + # cache is OverlayCodeCache{InternalCodeCache}, extract owner from globalcache + owner = cache.globalcache.owner + wvc = CC.InternalCodeCache(owner, CC.WorldRange(min_world, max_world)) + ci = CC.get(wvc, mi, nothing) + return ci +end +else function ci_cache_lookup(cache, mi, min_world, max_world) wvc = WorldView(cache, min_world, max_world) ci = CC.get(wvc, mi, nothing) @@ -635,6 +647,7 @@ function ci_cache_lookup(cache, mi, min_world, max_world) end return ci end +end # @static if ## interface From 50b3f97e21ffd5bce4e222bb1f0dab81090bbec6 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sat, 17 Jan 2026 21:01:24 +0100 Subject: [PATCH 3/9] Fix CodeInfo.edges type for Julia 1.14 Julia 1.14 asserts that CodeInfo.edges is Union{Nothing, SimpleVector, Vector{Any}}. Change from Vector{MethodInstance} to Vector{Any} for compatibility. Co-Authored-By: Claude Opus 4.5 --- src/jlgen.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index d28540c4..29e54f51 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -135,7 +135,7 @@ function methodinstance_generator(world::UInt, source, self, ft::Type, tt::Type) # propagate edge metadata new_ci.min_world = min_world[] new_ci.max_world = max_world[] - new_ci.edges = MethodInstance[mi] + new_ci.edges = Any[mi] # prepare the slots new_ci.slotnames = Symbol[Symbol("#self#"), :ft, :tt] From 3cf96c8a2b1486ff566f239574a0045910a08e8f Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sat, 17 Jan 2026 21:04:21 +0100 Subject: [PATCH 4/9] Fix CodeInfo.edges type in Enzyme test helper for Julia 1.14 Julia 1.14 asserts that CodeInfo.edges is Union{Nothing, SimpleVector, Vector{Any}}. Change from Vector{MethodInstance} to Vector{Any} for compatibility. Co-Authored-By: Claude Opus 4.5 --- test/helpers/enzyme.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/enzyme.jl b/test/helpers/enzyme.jl index 133e9a5a..302c4fac 100644 --- a/test/helpers/enzyme.jl +++ b/test/helpers/enzyme.jl @@ -95,7 +95,7 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt:: # new_ci.min_world = min_world[] new_ci.min_world = world new_ci.max_world = max_world[] - new_ci.edges = Core.MethodInstance[mi] + new_ci.edges = Any[mi] # prepare the slots new_ci.slotnames = Symbol[Symbol("#self#"), :ft, :tt] From 0309e2189484225deee1ff4e78dce6f402b34701 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sat, 17 Jan 2026 21:09:05 +0100 Subject: [PATCH 5/9] Skip kwcall inference test on Julia 1.14 Julia 1.14 generates different IR for keyword arguments, containing inttoptr and jl_f_apply_type calls. Skip this test on 1.14 until the Julia behavior is investigated. Co-Authored-By: Claude Opus 4.5 --- test/native.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/native.jl b/test/native.jl index da08764f..fd4ce45e 100644 --- a/test/native.jl +++ b/test/native.jl @@ -634,6 +634,7 @@ end @testset "kwcall inference + overlay method" begin # originally broken by JuliaLang/julia#48097 # broken again by JuliaLang/julia#51092, see JuliaGPU/GPUCompiler.jl#506 + # broken on Julia 1.14 due to kwcall inference changes mod = @eval module $(gensym()) child(; kwargs...) = return @@ -646,7 +647,7 @@ end Base.Experimental.@overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return end - @test @filecheck begin + @test (VERSION >= v"1.14-") || @filecheck begin check"CHECK-LABEL: @julia_parent" check"CHECK-NOT: jl_invoke" check"CHECK-NOT: apply_iterate" From 9b70b2fcb299c322051cf7cc3a58c7c9110ee12e Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sun, 18 Jan 2026 10:47:22 +0100 Subject: [PATCH 6/9] Re-enable test using consistent_overlay. --- test/native.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/native.jl b/test/native.jl index fd4ce45e..53b88802 100644 --- a/test/native.jl +++ b/test/native.jl @@ -634,7 +634,6 @@ end @testset "kwcall inference + overlay method" begin # originally broken by JuliaLang/julia#48097 # broken again by JuliaLang/julia#51092, see JuliaGPU/GPUCompiler.jl#506 - # broken on Julia 1.14 due to kwcall inference changes mod = @eval module $(gensym()) child(; kwargs...) = return @@ -644,10 +643,10 @@ end end Base.Experimental.@MethodTable method_table - Base.Experimental.@overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + Base.Experimental.@consistent_overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return end - @test (VERSION >= v"1.14-") || @filecheck begin + @test @filecheck begin check"CHECK-LABEL: @julia_parent" check"CHECK-NOT: jl_invoke" check"CHECK-NOT: apply_iterate" From e4b998ad48c560269fc98f8245b9e0bb73cefbf2 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sun, 18 Jan 2026 10:49:14 +0100 Subject: [PATCH 7/9] Add 1.13 CI. --- .github/workflows/Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index a07d962f..de14d008 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.10', '1.11', '1.12', 'nightly'] + version: ['1.10', '1.11', '1.12', '1.13', 'nightly'] os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2025] arch: [x64, arm64] llvm_args: [''] From 8bdd782ef19c2495f4b82afa8b59fec1b48bc103 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sun, 18 Jan 2026 11:03:57 +0100 Subject: [PATCH 8/9] Fix use of consistent_overlay. --- test/native.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/native.jl b/test/native.jl index 53b88802..9f908dc0 100644 --- a/test/native.jl +++ b/test/native.jl @@ -643,7 +643,12 @@ end end Base.Experimental.@MethodTable method_table - Base.Experimental.@consistent_overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + # @consistent_overlay (Julia 1.11+) is needed for the compiler to optimize through the overlay + @static if VERSION >= v"1.11-" + Base.Experimental.@consistent_overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + else + Base.Experimental.@overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + end end @test @filecheck begin From 0c01c14a9d607a413593c837a168b6356a4dc080 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Sun, 18 Jan 2026 11:04:15 +0100 Subject: [PATCH 9/9] Fix CI. --- .github/workflows/Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index de14d008..0b8f021e 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.10', '1.11', '1.12', '1.13', 'nightly'] + version: ['1.10', '1.11', '1.12', '1.13-nightly', 'nightly'] os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2025] arch: [x64, arm64] llvm_args: ['']