Skip to content

Commit a691e2d

Browse files
authored
[release-1.9] Support Julia 1.13 (#680)
1 parent 06aa020 commit a691e2d

5 files changed

Lines changed: 23 additions & 7 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ steps:
55
version:
66
- "1.10"
77
- "1.11"
8+
- "1.12"
9+
- "1.13"
810
plugins:
911
- JuliaCI/julia#v1:
1012
version: "{{matrix.version}}"
@@ -15,7 +17,6 @@ steps:
1517
using Pkg
1618
Pkg.develop(; path=pwd())
1719
Pkg.develop(; name="CUDA")' || exit 3
18-
1920
julia -e 'println("+++ :julia: Running tests")
2021
using Pkg
2122
Pkg.test("CUDA"; coverage=true, test_args=["base/kernelabstractions"])'

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
- '1.8'
2828
- '1.9'
2929
- '1.10'
30-
- '~1.11.0-0'
30+
- '1.11'
31+
- '1.12'
32+
- '1.13-nightly'
3133
os:
3234
- ubuntu-latest
3335
- macOS-latest

test/compiler.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ end
2424
A[1] = Base.Checked.checked_add(a, b)
2525
end
2626

27+
@static if VERSION > v"1.12"
28+
const MethodOrCodeInstance = Core.CodeInstance
29+
_getname(mi) = mi.def.def.name
30+
else
31+
const MethodOrCodeInstance = Core.MethodInstance
32+
_getname(mi) = mi.def.name
33+
end
34+
2735
function check_for_overdub(stmt)
2836
if stmt isa Expr
2937
if stmt.head == :invoke
30-
mi = first(stmt.args)::Core.MethodInstance
31-
if mi.def.name === :overdub
38+
mi = first(stmt.args)::MethodOrCodeInstance
39+
if _getname(mi) === :overdub
3240
@show stmt
3341
return true
3442
end

test/runtests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 1
3636
end
3737

3838
if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 2
39-
@kernel inbounds = true function my_bounded_kernel(a)
39+
@kernel inbounds = true function my_inbounds_kernel(a)
4040
idx = @index(Global, Linear)
4141
a[idx] = 0
4242
end
@@ -73,7 +73,8 @@ struct NewBackend <: KernelAbstractions.GPU end
7373
end
7474

7575
include("extensions/enzyme.jl")
76-
@static if VERSION >= v"1.7.0"
76+
# The Enzyme tests fail with Julia 1.13. They also fail with Julia 1.12 on Windows.
77+
@static if VERSION >= v"1.7.0" && VERSION < v"1.13-" && !(Sys.iswindows() && VERSION >= v"1.12-")
7778
@testset "Enzyme" begin
7879
enzyme_testsuite(CPU, Array)
7980
end

test/test.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; sk
206206
@test occursin("!alias.scope", IR)
207207
@test occursin("!noalias", IR)
208208
elseif backend_str == "CUDA"
209-
@test occursin("@llvm.nvvm.ldg", IR)
209+
if Base.libllvm_version >= v"20"
210+
@test occursin("addrspace(1)", IR)
211+
else
212+
@test occursin("@llvm.nvvm.ldg", IR)
213+
end
210214
elseif backend_str == "ROCM"
211215
@test occursin("addrspace(4)", IR)
212216
else

0 commit comments

Comments
 (0)