From a48ac573700b4d463ec785ccfafe3bf7f02a7bd1 Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:44:37 -0300 Subject: [PATCH 1/3] Adapt to `InferenceCache` changes --- src/jlgen.jl | 9 ++++++--- test/native/precompile.jl | 2 +- test/ptx/precompile.jl | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index 2812a02b..db3ab6e7 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -400,6 +400,9 @@ end get_method_table_view(world::UInt, mt::CC.MethodTable) = CC.OverlayMethodTable(world, mt) +# VERSION >= v"1.14.0-DEV.1691" +const INFERENCE_CACHE_TYPE = isdefined(CC, :InferenceCache) ? CC.InferenceCache : Vector{CC.InferenceResult} + struct GPUInterpreter{MTV<:CC.MethodTableView} <: CC.AbstractInterpreter world::UInt method_table_view::MTV @@ -409,7 +412,7 @@ struct GPUInterpreter{MTV<:CC.MethodTableView} <: CC.AbstractInterpreter else code_cache::CodeCache end - inf_cache::Vector{CC.InferenceResult} + inf_cache::INFERENCE_CACHE_TYPE inf_params::CC.InferenceParams opt_params::CC.OptimizationParams @@ -423,7 +426,7 @@ function GPUInterpreter(world::UInt=Base.get_world_counter(); opt_params::CC.OptimizationParams) @assert world <= Base.get_world_counter() - inf_cache = Vector{CC.InferenceResult}() + inf_cache = INFERENCE_CACHE_TYPE() return GPUInterpreter(world, method_table_view, token, inf_cache, @@ -434,7 +437,7 @@ function GPUInterpreter(interp::GPUInterpreter; world::UInt=interp.world, method_table_view::CC.MethodTableView=interp.method_table_view, token::Any=interp.token, - inf_cache::Vector{CC.InferenceResult}=interp.inf_cache, + inf_cache::INFERENCE_CACHE_TYPE=interp.inf_cache, inf_params::CC.InferenceParams=interp.inf_params, opt_params::CC.OptimizationParams=interp.opt_params) return GPUInterpreter(world, method_table_view, diff --git a/test/native/precompile.jl b/test/native/precompile.jl index b96fb0a3..14ac418f 100644 --- a/test/native/precompile.jl +++ b/test/native/precompile.jl @@ -76,7 +76,7 @@ precompile_test_harness("Inference caching") do load_path @test check_presence(square_mi, token) # check that identity survived - @test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || v"1.13.0-" <= VERSION < v"1.13.0-beta3") + @test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || v"1.13.0-" <= VERSION < v"1.13.0-beta3"|| v"1.14.0-" <= VERSION < v"1.14.0-DEV.1843") GPUCompiler.clear_disk_cache!() @test GPUCompiler.disk_cache_enabled() == false diff --git a/test/ptx/precompile.jl b/test/ptx/precompile.jl index 1b4e2d73..290c60be 100644 --- a/test/ptx/precompile.jl +++ b/test/ptx/precompile.jl @@ -49,6 +49,6 @@ precompile_test_harness("Inference caching") do load_path @test check_presence(kernel_mi, token) # check that identity survived - @test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || v"1.13.0-" <= VERSION < v"1.13.0-beta3") + @test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || v"1.13.0-" <= VERSION < v"1.13.0-beta3"|| v"1.14.0-" <= VERSION < v"1.14.0-DEV.1843") end end From 5bf41ceedf6d3b8b0808aca73fe92e0c7c91d66f Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:07:26 -0300 Subject: [PATCH 2/3] Fix `code_llvm` with nightly julia --- src/reflection.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reflection.jl b/src/reflection.jl index a180f2fb..1b62ef88 100644 --- a/src/reflection.jl +++ b/src/reflection.jl @@ -167,6 +167,10 @@ InteractiveUtils.code_warntype(err::KernelError; kwargs...) = code_warntype(err. struct jl_llvmf_dump TSM::LLVM.API.LLVMOrcThreadSafeModuleRef F::LLVM.API.LLVMValueRef +@static if VERSION >= v"1.14.0-DEV.1823" # JuliaLang/julia#60698 + dump::Ptr{Nothing} + jl_llvmf_dump(TSM::LLVM.API.LLVMOrcThreadSafeModuleRef, F::LLVM.API.LLVMValueRef) = new(TSM, F, C_NULL) +end end """ From 1e039916f3aa7f797df8775a6910d123f76f791d Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:49:17 -0300 Subject: [PATCH 3/3] [temp] Disable source of hang --- test/native.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/native.jl b/test/native.jl index eeab2805..86aba5d7 100644 --- a/test/native.jl +++ b/test/native.jl @@ -304,7 +304,7 @@ end # breaking recursion in print_to_string makes it possible to compile # even in the presence of the above bug - Native.code_llvm(devnull, Base.print_to_string, Tuple{Int,Int}; optimize=false) + # Native.code_llvm(devnull, Base.print_to_string, Tuple{Int,Int}; optimize=false) @test "We did not crash!" != "" end