Skip to content
Draft
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
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
2 changes: 1 addition & 1 deletion test/native.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why disable this test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a temporary commit I pushed to confirm that it was the source of the hang in the native testset on nightly. Any idea what could be causing the hang?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recursion triggering recursion during codegen? There's been inference cache changes, after all.


@test "We did not crash!" != ""
end
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" || VERSION>=v"1.13.0-")
@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" || VERSION>=v"1.13.0-")
@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