Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ To ensure that everything is working you can run tests for the package with
pkg> test AMDGPU
```

Or specifying a subset of tests to run:
Or specifying a subset of tests to run on 4 workers in parallel:

```julia
julia> using Pkg

julia> Pkg.test("AMDGPU"; test_args=["core", "kernelabstractions"])
julia> Pkg.test("AMDGPU"; test_args=`--jobs=4 core kernelabstractions`)
```

Full list of tests to run can be obtained with `--list` argument:
Full list of tests to run can be obtained with `--list` argument (refer to [ParallelTestRunner.jl's doc](https://juliatesting.github.io/ParallelTestRunner.jl/dev/#Command-Line-Options) for the full list of available command line arguments):

```julia
julia> Pkg.test("AMDGPU"; test_args=["--list"])
julia> Pkg.test("AMDGPU"; test_args=`--list`])
```

## Questions and Contributions
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function main()
"Performance Tips" => "tutorials/perf.md",
"Profiling" => "tutorials/profiling.md",
"Installation Tips" => "install_tips.md",
"Testing" => "testing.md",
],
"API" => [
"Devices" => "api/devices.md",
Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Simply add the AMDGPU.jl package to your Julia environment:

```julia
using Pkg

Pkg.add("AMDGPU")
```

Expand Down Expand Up @@ -62,6 +63,7 @@ To ensure that everything works, you can run the test suite:
```julia
using AMDGPU
using Pkg

Pkg.test("AMDGPU")
```

Expand Down
42 changes: 42 additions & 0 deletions docs/src/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Testing

To ensure that everything is working you can run tests for the package with:

```julia
pkg> test AMDGPU
```

## Advanced testing options

AMDGPU tests use [ParallelTestRunner.jl]((https://juliatesting.github.io/ParallelTestRunner.jl) which allow for [running tests with various (command line) options](https://juliatesting.github.io/ParallelTestRunner.jl/dev/#Running-Tests).

To, e.g., launch a subset of tests `core` and `kernelabstractions` on 4 runners in parallel:

```julia
julia> using Pkg

julia> Pkg.test("AMDGPU"; test_args=`--jobs=4 core kernelabstractions`)
```

The full list of tests to run can be obtained with `--list` argument:

```julia
julia> Pkg.test("AMDGPU"; test_args=`--list`])
```

## Testing categories

Although tests can be run in a custom fashion upon exploring the output of listing (using the `--list` test argument), tests are organised such that following grouping by categories is possible:

```
core device hip external gpuarrays kernelabstractions wmma enzyme
```

which allows to, e.g., run all `gpuarrays` related tests as

```
julia> Pkg.test("AMDGPU"; test_args=`gpuarrays`)
```

!!! warning "Large memory tests"
Some tests HIP and GPUArrays tests may use > 20GB of host RAM. It is recommended to use fewer workers (<= 4) on machines that have < 32Gb of host RAM in case running tests would result in out of memory errors.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ using Test
using AMDGPU
using AMDGPU: ROCArray

import GPUArrays
include(joinpath(pkgdir(GPUArrays), "test", "testsuite.jl"))
testf(f, xs...; kwargs...) = TestSuite.compare(f, AMDGPU.ROCArray, xs...; kwargs...)

@testset "broadcast" begin
@test testf((x) -> fill!(x, 1), rand(3,3))
@test testf((x, y) -> map(+, x, y), rand(2, 3), rand(2, 3))
Expand Down
File renamed without changes.
17 changes: 0 additions & 17 deletions test/gpuarrays_base.jl

This file was deleted.

15 changes: 0 additions & 15 deletions test/gpuarrays_indexing.jl

This file was deleted.

15 changes: 0 additions & 15 deletions test/gpuarrays_linalg.jl

This file was deleted.

15 changes: 0 additions & 15 deletions test/gpuarrays_math.jl

This file was deleted.

21 changes: 0 additions & 21 deletions test/gpuarrays_misc.jl

This file was deleted.

15 changes: 0 additions & 15 deletions test/gpuarrays_reductions.jl

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 4 additions & 8 deletions test/rocarray/blas.jl → test/hip_rocarray/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ using AMDGPU
using AMDGPU: ROCArray, ROCVector, ROCMatrix
using LinearAlgebra

import GPUArrays
include(joinpath(pkgdir(GPUArrays), "test", "testsuite.jl"))
testf(f, xs...; kwargs...) = TestSuite.compare(f, AMDGPU.ROCArray, xs...; kwargs...)

@assert AMDGPU.functional(:rocblas)

@testset "BLAS" begin
Expand Down Expand Up @@ -132,7 +128,7 @@ end
@test testf(
(y, a, b) -> mul!(y, Hermitian(a), b), rand(T, 5),
rand(T, 5, 5), rand(T, 5))

A_ = rand(T, m, m)
A = A_ + A_'
x = rand(T, m)
Expand Down Expand Up @@ -423,7 +419,7 @@ end
dC = rocBLAS.trsm('L', 'U', 'N', 'N', one(T), dA, dB)
@test collect(dC) ≈ triu(view(A,1:m,1:m)) \ view(B,1:m,1:m)
end

@testset "trsm_batched" begin
batch_count = 3
A = [rand(T, m, m) for ix in 1:batch_count]
Expand Down Expand Up @@ -661,7 +657,7 @@ end
@test C ≈ h_C
end
@testset "herk T=$T" for T in (ComplexF32, ComplexF64)
T1 = T
T1 = T
T2 = real(T)
# generate parameters
α = rand(T2)
Expand Down Expand Up @@ -689,7 +685,7 @@ end
@test C ≈ h_C
end
@testset "her2k T=$T" for T in (ComplexF32, ComplexF64)
T1 = T
T1 = T
T2 = real(T)
# generate parameters
α = rand(T1)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading