Skip to content

Commit 3dde18c

Browse files
committed
Try it out.
1 parent 7f98569 commit 3dde18c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/helpers/ptx.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ function code_llvm(io::IO, @nospecialize(func), @nospecialize(types); kwargs...)
6161
job, kwargs = create_job(func, types; kwargs...)
6262
GPUCompiler.code_llvm(io, job; kwargs...)
6363
end
64+
code_llvm(@nospecialize(func), @nospecialize(types); kwargs...) =
65+
code_llvm(stdout, func, types; kwargs...)
6466

6567
function code_native(io::IO, @nospecialize(func), @nospecialize(types); kwargs...)
6668
job, kwargs = create_job(func, types; kwargs...)

test/ptx.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ end
2020
end
2121
end
2222

23-
ir = sprint(io->PTX.code_llvm(io, mod.kernel, Tuple{mod.Aggregate}))
24-
@test occursin(r"@(julia|j)_kernel\w*\(({ i64 }|\[1 x i64\])\* ", ir) ||
25-
occursin(r"@(julia|j)_kernel\w*\(ptr ", ir)
23+
filecheck(raw"""
24+
; TYPED: @{{(julia|j)_kernel_[0-9]+}}({{(\{ i64 \}|\[1 x i64\])}}*
25+
; OPAQUE: @{{(julia|j)_kernel_[0-9]+}}(ptr
26+
""") do _
27+
PTX.code_llvm(mod.kernel, Tuple{mod.Aggregate})
28+
end
2629

2730
ir = sprint(io->PTX.code_llvm(io, mod.kernel, Tuple{mod.Aggregate}; kernel=true))
2831
@test occursin(r"@_Z6kernel9Aggregate\(.*({ i64 }|\[1 x i64\]) ", ir)

0 commit comments

Comments
 (0)