Skip to content

Commit

Permalink
Remove vendor-agnostic tests already covered by the PTX ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Apr 27, 2020
1 parent 5a62cba commit 1efe11f
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions test/gcn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,7 @@ end

@testset "IR" begin

@testset "exceptions" begin
foobar() = throw(DivideError())
ir = sprint(io->gcn_code_llvm(io, foobar, Tuple{}))

# plain exceptions should get lowered to a call to the GPU run-time
@test occursin("gpu_report_exception", ir)
# not a jl_throw referencing a jl_value_t representing the exception
@test !occursin("jl_throw", ir)
end
@testset "kernel functions" begin
@testset "wrapper function aggregate rewriting" begin
kernel(x) = return

@eval struct Aggregate
x::Int
end

ir = sprint(io->gcn_code_llvm(io, kernel, Tuple{Aggregate}))
@test occursin(r"@.*julia_kernel.+\(({ i64 }|\[1 x i64\]) addrspace\(\d+\)?\*", ir)

ir = sprint(io->gcn_code_llvm(io, kernel, Tuple{Aggregate}; kernel=true))
@test occursin(r"@.*julia_kernel.+\(({ i64 }|\[1 x i64\])\)", ir)
end

@testset "callconv" begin
@testset "kernel calling convention" begin
kernel() = return

ir = sprint(io->gcn_code_llvm(io, kernel, Tuple{}; dump_module=true))
Expand All @@ -81,7 +57,6 @@ end
dump_module=true, kernel=true))
@test occursin("amdgpu_kernel", ir)
end
end

end

Expand Down

0 comments on commit 1efe11f

Please sign in to comment.