Skip to content

Commit 16fed03

Browse files
committed
Account for Julia 1.10 boxed constants in PTX tests
1 parent 6f0d77f commit 16fed03

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/ptx.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,14 @@ end
9999
end
100100
end
101101
ir = sprint(io->PTX.code_llvm(io, mod.consume, Tuple{Bool,Int32}; dump_module=true))
102-
@test occursin(r"@[A-Za-z0-9_]+_box = externally_initialized global", ir)
102+
# As with Symbol literals above, Julia 1.10 may bake the type pointer before
103+
# GPUCompiler can represent it as a relocation.
104+
@static if VERSION >= v"1.11"
105+
@test occursin(r"@[A-Za-z0-9_]+_box = externally_initialized global", ir)
106+
else
107+
@test occursin(r"@[A-Za-z0-9_]+_box = externally_initialized global", ir) ||
108+
occursin("inttoptr", ir)
109+
end
103110
end
104111

105112
@testset "kernel functions" begin

0 commit comments

Comments
 (0)