Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit 914ed3e

Browse files
committed
Add a test.
1 parent 0f6f20b commit 914ed3e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/device/array.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,19 @@ end
108108
ir = sprint(io->CUDAnative.code_llvm(io, oob_2d, (CuDeviceArray{Int,2,AS.Global},)))
109109
@test !occursin("julia_throw_boundserror", ir)
110110
@test occursin("ptx_report_exception", ir)
111+
112+
@testset "#313" begin
113+
function kernel(dest)
114+
dest[1] = 1
115+
nothing
116+
end
117+
tt = Tuple{SubArray{Float64,2,CuDeviceArray{Float64,2,AS.Global},
118+
Tuple{UnitRange{Int64},UnitRange{Int64}},false}}
119+
120+
ir = sprint(io->CUDAnative.code_llvm(io, kernel, tt))
121+
@test !occursin("jl_invoke", ir)
122+
CUDAnative.code_ptx(devnull, kernel, tt)
123+
end
111124
end
112125

113126
@testset "views" begin

0 commit comments

Comments
 (0)