Skip to content

Commit 61e84b0

Browse files
Fix some tests (#767)
* Fix SPIRV tests after 1.12.5 Potentially related to JuliaLang/julia#60695 * Fix precompile tests * Formatting
1 parent 1976f0d commit 61e84b0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

test/native/precompile.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ precompile_test_harness("Inference caching") do load_path
1313
A[1] = x
1414
return
1515
end
16-
16+
1717
function kernel_w_global(A, x, sym)
1818
if sym == :A
1919
A[1] = x
@@ -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=VERSION>=v"1.12.0-DEV.1268"
79+
@test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || VERSION>=v"1.13.0-")
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=VERSION>=v"1.12.0-DEV.1268"
52+
@test check_presence(identity_mi, token) broken=(v"1.12.0-DEV.1268" <= VERSION < v"1.12.5" || VERSION>=v"1.13.0-")
5353
end
5454
end

test/spirv.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,16 @@ end
133133
# TODO: should structs of `NTuple{VecElement{T}}` be passed by value instead of sret?
134134
check"CHECK-NOT: i128"
135135
check"CHECK-LABEL: define void @{{(julia|j)_kernel_[0-9]+}}"
136-
@static VERSION >= v"1.12" && check"CHECK: alloca <2 x i64>, align 16"
136+
@static v"1.12" <= VERSION < v"1.12.5" && check"CHECK: alloca <2 x i64>, align 16"
137+
@static VERSION >= v"1.12.5" && check"CHECK: alloca [2 x i64], align 16"
137138
SPIRV.code_llvm(mod.kernel, NTuple{2, mod.Vec{4, Float32}}; backend, dump_module=true)
138139
end
139140

140141
@test @filecheck begin
141142
check"CHECK-NOT: i128"
142143
check"CHECK-LABEL: define void @{{(julia|j)_kernel_[0-9]+}}"
143-
@static VERSION >= v"1.12" && check"CHECK: alloca [2 x <2 x i64>], align 16"
144+
@static v"1.12" <= VERSION < v"1.12.5" && check"CHECK: alloca [2 x <2 x i64>], align 16"
145+
@static VERSION >= v"1.12.5" && check"CHECK: alloca [4 x i64], align 16"
144146
SPIRV.code_llvm(mod.kernel, NTuple{2, mod.Vec{8, Float32}}; backend, dump_module=true)
145147
end
146148
end

0 commit comments

Comments
 (0)