diff --git a/Project.toml b/Project.toml index 96ac0705..258ecdc4 100644 --- a/Project.toml +++ b/Project.toml @@ -3,6 +3,9 @@ uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" version = "1.8.2" authors = ["Tim Besard "] +[workspace] +projects = ["test"] + [deps] ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 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/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 """ diff --git a/test/Project.toml b/test/Project.toml index 56eaf449..a7f37a80 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,6 @@ [deps] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LLVM = "929cbde3-209d-540e-8aea-75f648917ca0" 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