Skip to content

Commit

Permalink
Isolate rocFFT tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pxl-th committed Aug 9, 2023
1 parent e70f6e1 commit abce202
Showing 1 changed file with 109 additions and 109 deletions.
218 changes: 109 additions & 109 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ include("setup.jl")
@info "Testing using device $(AMDGPU.default_device())."
AMDGPU.versioninfo()

if "core" in TARGET_TESTS
@testset verbose=true "Device Functions" begin
@info "Testing `Device Functions` on the main thread without workers."

include("device/launch.jl")
include("device/array.jl")
include("device/vadd.jl")
include("device/memory.jl")
include("device/indexing.jl")
include("device/math.jl")
include("device/wavefront.jl")
include("device/execution_control.jl")
include("device/exceptions.jl")
include("device/hostcall.jl")
include("device/output.jl")
end
end
# if "core" in TARGET_TESTS
# @testset verbose=true "Device Functions" begin
# @info "Testing `Device Functions` on the main thread without workers."

# include("device/launch.jl")
# include("device/array.jl")
# include("device/vadd.jl")
# include("device/memory.jl")
# include("device/indexing.jl")
# include("device/math.jl")
# include("device/wavefront.jl")
# include("device/execution_control.jl")
# include("device/exceptions.jl")
# include("device/hostcall.jl")
# include("device/output.jl")
# end
# end

@testset "AMDGPU" begin

Expand Down Expand Up @@ -126,109 +126,109 @@ tasks = Dict{Int,String}()

@info "Running tests with $(length(ws)) workers with flags: $(AMDGPU.julia_exeflags())"

if "core" in TARGET_TESTS
push!(tests, "HSA" => () -> begin
include("hsa/utils.jl")
include("hsa/getinfo.jl")
include("hsa/device.jl")
end)
push!(tests, "Codegen" => () -> begin
include("codegen/synchronization.jl")
include("codegen/trap.jl")
end)
push!(tests, "Multitasking" => () -> include("tls.jl"))
push!(tests, "ROCArray - Base" => () -> include("rocarray/base.jl"))
push!(tests, "ROCArray - Broadcast" => () -> include("rocarray/broadcast.jl"))

# if AMDGPU.Runtime.LOGGING_STATIC_ENABLED
# push!(tests, "Logging" => () -> include("logging.jl"))
# else
# @warn """
# Logging is statically disabled, skipping logging tests.
# This can be fixed by calling `AMDGPU.Runtime.enable_logging!()` and re-running tests.
# """
# @test_skip "Logging"
# end
end
# if "core" in TARGET_TESTS
# push!(tests, "HSA" => () -> begin
# include("hsa/utils.jl")
# include("hsa/getinfo.jl")
# include("hsa/device.jl")
# end)
# push!(tests, "Codegen" => () -> begin
# include("codegen/synchronization.jl")
# include("codegen/trap.jl")
# end)
# push!(tests, "Multitasking" => () -> include("tls.jl"))
# push!(tests, "ROCArray - Base" => () -> include("rocarray/base.jl"))
# push!(tests, "ROCArray - Broadcast" => () -> include("rocarray/broadcast.jl"))

# # if AMDGPU.Runtime.LOGGING_STATIC_ENABLED
# # push!(tests, "Logging" => () -> include("logging.jl"))
# # else
# # @warn """
# # Logging is statically disabled, skipping logging tests.
# # This can be fixed by calling `AMDGPU.Runtime.enable_logging!()` and re-running tests.
# # """
# # @test_skip "Logging"
# # end
# end

if "hip" in TARGET_TESTS
push!(tests, "ROCm libraries are functional" => () -> begin
@test AMDGPU.functional(:rocblas)
@test AMDGPU.functional(:rocrand)
if !AMDGPU.use_artifacts()
# We don't have artifacts for these
@test AMDGPU.functional(:rocfft)
end
end)
push!(tests, "rocBLAS" => () -> begin
if AMDGPU.functional(:rocblas)
include("rocarray/blas.jl")
else
@test_skip "rocBLAS"
end
end)
push!(tests, "rocSOLVER" => () -> begin
if AMDGPU.functional(:rocsolver)
include("rocarray/solver.jl")
else
@test_skip "rocSOLVER"
end
end)
push!(tests, "rocSPARSE" => () -> begin
if AMDGPU.functional(:rocsparse)
include("rocsparse/rocsparse.jl")
else
@test_skip "rocSPARSE"
end
end)
push!(tests, "rocRAND" => () -> begin
if AMDGPU.functional(:rocrand)
include("rocarray/random.jl")
else
@test_skip "rocRAND"
end
end)
# push!(tests, "ROCm libraries are functional" => () -> begin
# @test AMDGPU.functional(:rocblas)
# @test AMDGPU.functional(:rocrand)
# if !AMDGPU.use_artifacts()
# # We don't have artifacts for these
# @test AMDGPU.functional(:rocfft)
# end
# end)
# push!(tests, "rocBLAS" => () -> begin
# if AMDGPU.functional(:rocblas)
# include("rocarray/blas.jl")
# else
# @test_skip "rocBLAS"
# end
# end)
# push!(tests, "rocSOLVER" => () -> begin
# if AMDGPU.functional(:rocsolver)
# include("rocarray/solver.jl")
# else
# @test_skip "rocSOLVER"
# end
# end)
# push!(tests, "rocSPARSE" => () -> begin
# if AMDGPU.functional(:rocsparse)
# include("rocsparse/rocsparse.jl")
# else
# @test_skip "rocSPARSE"
# end
# end)
# push!(tests, "rocRAND" => () -> begin
# if AMDGPU.functional(:rocrand)
# include("rocarray/random.jl")
# else
# @test_skip "rocRAND"
# end
# end)
push!(tests, "rocFFT" => () -> begin
if AMDGPU.functional(:rocfft)
include("rocarray/fft.jl")
else
@test_skip "rocFFT"
end
end)
push!(tests, "MIOpen" => () -> begin
if AMDGPU.functional(:MIOpen)
include("dnn/miopen.jl")
else
@test_skip "MIOpen"
end
end)
# push!(tests, "MIOpen" => () -> begin
# if AMDGPU.functional(:MIOpen)
# include("dnn/miopen.jl")
# else
# @test_skip "MIOpen"
# end
# end)
end

"ext" in TARGET_TESTS && push!(tests,
"External Packages" => () -> include("external/forwarddiff.jl"))

if "gpuarrays" in TARGET_TESTS
for (i, name) in enumerate(sort(collect(keys(TestSuite.tests))))
push!(tests, "GPUArrays TestSuite - $name" => () -> begin
TestSuite.tests[name](ROCArray)
# Multidimensional indexing involves boxing, launching global malloc hostcall.
# Synchronize to disable it.
if name == "indexing multidimensional"
AMDGPU.synchronize(; blocking=false)
end
end)
end
end

if "kernelabstractions" in TARGET_TESTS
push!(tests, "KernelAbstractions" => ()-> begin
Testsuite.testsuite(
ROCBackend, "ROCM", AMDGPU, ROCArray, AMDGPU.ROCDeviceArray;
skip_tests=Set(["Printing", "sparse"])) # TODO fix KA printing
# Disable global malloc hostcall started by conversion tests.
AMDGPU.synchronize(; blocking=false)
end)
end
# "ext" in TARGET_TESTS && push!(tests,
# "External Packages" => () -> include("external/forwarddiff.jl"))

# if "gpuarrays" in TARGET_TESTS
# for (i, name) in enumerate(sort(collect(keys(TestSuite.tests))))
# push!(tests, "GPUArrays TestSuite - $name" => () -> begin
# TestSuite.tests[name](ROCArray)
# # Multidimensional indexing involves boxing, launching global malloc hostcall.
# # Synchronize to disable it.
# if name == "indexing multidimensional"
# AMDGPU.synchronize(; blocking=false)
# end
# end)
# end
# end

# if "kernelabstractions" in TARGET_TESTS
# push!(tests, "KernelAbstractions" => ()-> begin
# Testsuite.testsuite(
# ROCBackend, "ROCM", AMDGPU, ROCArray, AMDGPU.ROCDeviceArray;
# skip_tests=Set(["Printing", "sparse"])) # TODO fix KA printing
# # Disable global malloc hostcall started by conversion tests.
# AMDGPU.synchronize(; blocking=false)
# end)
# end

function run_worker(w)
while !isempty(tests)
Expand Down

0 comments on commit abce202

Please sign in to comment.