Skip to content

Commit f427a3f

Browse files
Fixes for nightly (#771)
Co-authored-by: Tim Besard <tim.besard@gmail.com>
1 parent ee4a85c commit f427a3f

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
33
version = "1.8.2"
44
authors = ["Tim Besard <tim.besard@gmail.com>"]
55

6+
[workspace]
7+
projects = ["test"]
8+
69
[deps]
710
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
811
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

src/jlgen.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ end
400400

401401
get_method_table_view(world::UInt, mt::CC.MethodTable) = CC.OverlayMethodTable(world, mt)
402402

403+
# VERSION >= v"1.14.0-DEV.1691"
404+
const INFERENCE_CACHE_TYPE = isdefined(CC, :InferenceCache) ? CC.InferenceCache : Vector{CC.InferenceResult}
405+
403406
struct GPUInterpreter{MTV<:CC.MethodTableView} <: CC.AbstractInterpreter
404407
world::UInt
405408
method_table_view::MTV
@@ -409,7 +412,7 @@ struct GPUInterpreter{MTV<:CC.MethodTableView} <: CC.AbstractInterpreter
409412
else
410413
code_cache::CodeCache
411414
end
412-
inf_cache::Vector{CC.InferenceResult}
415+
inf_cache::INFERENCE_CACHE_TYPE
413416

414417
inf_params::CC.InferenceParams
415418
opt_params::CC.OptimizationParams
@@ -423,7 +426,7 @@ function GPUInterpreter(world::UInt=Base.get_world_counter();
423426
opt_params::CC.OptimizationParams)
424427
@assert world <= Base.get_world_counter()
425428

426-
inf_cache = Vector{CC.InferenceResult}()
429+
inf_cache = INFERENCE_CACHE_TYPE()
427430

428431
return GPUInterpreter(world, method_table_view,
429432
token, inf_cache,
@@ -434,7 +437,7 @@ function GPUInterpreter(interp::GPUInterpreter;
434437
world::UInt=interp.world,
435438
method_table_view::CC.MethodTableView=interp.method_table_view,
436439
token::Any=interp.token,
437-
inf_cache::Vector{CC.InferenceResult}=interp.inf_cache,
440+
inf_cache::INFERENCE_CACHE_TYPE=interp.inf_cache,
438441
inf_params::CC.InferenceParams=interp.inf_params,
439442
opt_params::CC.OptimizationParams=interp.opt_params)
440443
return GPUInterpreter(world, method_table_view,

src/reflection.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ InteractiveUtils.code_warntype(err::KernelError; kwargs...) = code_warntype(err.
167167
struct jl_llvmf_dump
168168
TSM::LLVM.API.LLVMOrcThreadSafeModuleRef
169169
F::LLVM.API.LLVMValueRef
170+
@static if VERSION >= v"1.14.0-DEV.1823" # JuliaLang/julia#60698
171+
dump::Ptr{Nothing}
172+
jl_llvmf_dump(TSM::LLVM.API.LLVMOrcThreadSafeModuleRef, F::LLVM.API.LLVMValueRef) = new(TSM, F, C_NULL)
173+
end
170174
end
171175

172176
"""

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
34
IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
45
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
56
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"

test/native/precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ precompile_test_harness("Inference caching") do load_path
7676
@test check_presence(square_mi, token)
7777

7878
# check that identity survived
79-
@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")
79+
@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")
8080

8181
GPUCompiler.clear_disk_cache!()
8282
@test GPUCompiler.disk_cache_enabled() == false

test/ptx/precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ precompile_test_harness("Inference caching") do load_path
4949
@test check_presence(kernel_mi, token)
5050

5151
# check that identity survived
52-
@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")
52+
@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")
5353
end
5454
end

0 commit comments

Comments
 (0)