Skip to content

Commit 318b07e

Browse files
authored
Merge pull request #868 from JuliaGPU/tb/nightly
Fixes for nightly
2 parents c740f2e + 3f3c261 commit 318b07e

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

test/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
66
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
77
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
88
LLVMDowngrader_jll = "f52de702-fb25-5922-94ba-81dd59b07444"
9-
LLVM_jll = "86de99a1-58d6-5da7-8064-bd56ce2e322c"
109
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1110
NVPTX_LLVM_Backend_jll = "ef6e0fe3-e6ef-59c0-bde6-4989574699e0"
1211
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
@@ -21,5 +20,4 @@ demumble_jll = "1e29f10c-031c-5a83-9565-69cddfc27673"
2120

2221
[compat]
2322
Aqua = "0.8"
24-
LLVM_jll = "15,16,18,20"
2523
ParallelTestRunner = "2"

test/gcn.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,20 +458,19 @@ end
458458
@testset "float boxes" begin
459459
mod = @eval module $(gensym())
460460
function kernel(a,b)
461+
# Int32(a) may fail, boxing the Float32 for the @nospecialize ctor
461462
c = Int32(a)
462-
# the conversion to Int32 may fail, in which case the input Float32 is boxed in order to
463-
# pass it to the @nospecialize exception constructor. we should really avoid that (eg.
464-
# by avoiding @nospecialize, or optimize the unused arguments away), but for now the box
465-
# should just work.
466463
unsafe_store!(b, c)
467464
return
468465
end
469466
end
470467

471468
@test @filecheck begin
472469
@check_label "define void @{{(julia|j)_kernel_[0-9]+}}"
473-
@check "jl_box_float32"
474-
GCN.code_llvm(mod.kernel, Tuple{Float32,Ptr{Float32}})
470+
# box: a jl_box_float32 call <1.14; 1.14+ inlines it into the devirt'd ctor
471+
@check cond=(VERSION < v"1.14-") "jl_box_float32"
472+
@check cond=(VERSION >= v"1.14-") "gpu_gc_pool_alloc"
473+
GCN.code_llvm(mod.kernel, Tuple{Float32,Ptr{Float32}}; dump_module=true)
475474
end
476475
GCN.code_native(devnull, mod.kernel, Tuple{Float32,Ptr{Float32}})
477476
end

test/ptx.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,20 +371,19 @@ end
371371
@testset "float boxes" begin
372372
mod = @eval module $(gensym())
373373
function kernel(a,b)
374+
# Int32(a) may fail, boxing the Float32 for the @nospecialize ctor
374375
c = Int32(a)
375-
# the conversion to Int32 may fail, in which case the input Float32 is boxed in
376-
# order to pass it to the @nospecialize exception constructor. we should really
377-
# avoid that (eg. by avoiding @nospecialize, or optimize the unused arguments
378-
# away), but for now the box should just work.
379376
unsafe_store!(b, c)
380377
return
381378
end
382379
end
383380

384381
@test @filecheck begin
385382
@check_label "define void @{{(julia|j)_kernel_[0-9]+}}"
386-
@check "jl_box_float32"
387-
PTX.code_llvm(mod.kernel, Tuple{Float32,Ptr{Float32}})
383+
# box: a jl_box_float32 call <1.14; 1.14+ inlines it into the devirt'd ctor
384+
@check cond=(VERSION < v"1.14-") "jl_box_float32"
385+
@check cond=(VERSION >= v"1.14-") "gpu_gc_pool_alloc"
386+
PTX.code_llvm(mod.kernel, Tuple{Float32,Ptr{Float32}}; dump_module=true)
388387
end
389388
PTX.code_native(devnull, mod.kernel, Tuple{Float32,Ptr{Float32}})
390389
end

0 commit comments

Comments
 (0)