Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
version = "1.8.2"
authors = ["Tim Besard <tim.besard@gmail.com>"]

[workspace]
projects = ["test"]

[deps]
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand Down
9 changes: 6 additions & 3 deletions src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions src/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand Down
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/native/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/ptx/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading