From 53c6db9965a99ded4222868d391bdd1f079bce87 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Wed, 16 Mar 2022 12:27:40 +0900 Subject: [PATCH 1/3] adapt to upstream changes to `Base.return_types` Especially this commits adds the update corresponding to . --- src/validation.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/validation.jl b/src/validation.jl index 3125c2b6..2742d6e8 100644 --- a/src/validation.jl +++ b/src/validation.jl @@ -16,7 +16,12 @@ function check_method(@nospecialize(job::CompilerJob)) cache = ci_cache(job) mt = method_table(job) interp = GPUInterpreter(cache, mt, job.source.world) - rt = Base.return_types(job.source.f, job.source.tt, interp)[1] + @static if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION ≥ v"1.9.0-DEV.190" + # https://github.com/JuliaLang/julia/pull/44515 + rt = Base.return_types(job.source.f, job.source.tt; interp)[1] + else + rt = Base.return_types(job.source.f, job.source.tt, interp)[1] + end if rt != Nothing throw(KernelError(job, "kernel returns a value of type `$rt`", """Make sure your kernel function ends in `return`, `return nothing` or `nothing`. From 29bc8005b1bcdfcf6d797d44cd0cd51a6ed28aa7 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 16 Mar 2022 08:34:32 +0100 Subject: [PATCH 2/3] Fix test. --- test/native.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/native.jl b/test/native.jl index 65898b94..d478031e 100644 --- a/test/native.jl +++ b/test/native.jl @@ -330,7 +330,7 @@ end # Test ABI removal ir = sprint(io->native_code_llvm(io, call_real, Tuple{ComplexF64})) - if VERSION < v"1.8-" + if VERSION < v"1.8-" || v"1.8-beta2" <= VERSION < v"1.9-" || VERSION ≥ v"1.9.0-DEV.190" @test !occursin("alloca", ir) else @test_broken !occursin("alloca", ir) From 2000a2e155d8cb56d375016a689bcba1ee36a9f6 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Wed, 16 Mar 2022 17:01:11 +0900 Subject: [PATCH 3/3] more update with backports --- src/jlgen.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index aa74d2b9..1a2f038f 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -226,7 +226,7 @@ end if isdefined(Base.Experimental, Symbol("@overlay")) using Core.Compiler: OverlayMethodTable -if VERSION >= v"1.9.0-DEV.120" +if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" Core.Compiler.method_table(interp::GPUInterpreter) = OverlayMethodTable(interp.world, interp.method_table) else