Skip to content

Commit

Permalink
Update AMDGPU compat to 0.5 (#521)
Browse files Browse the repository at this point in the history
- Update AMDGPU compat to 0.5
- Don't use artifacts in CI, since 0.5 requires ROCm 5.3+ for which there are no artifacts available.
  • Loading branch information
pxl-th authored Jul 7, 2023
1 parent a5fbf95 commit 91534e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ steps:
queue: "juliagpu"
rocm: "*"
rocmgpu: "*"
timeout_in_minutes: 60
timeout_in_minutes: 180
env:
JULIA_AMDGPU_CORE_MUST_LOAD: "1"
JULIA_AMDGPU_HIP_MUST_LOAD: "1"
JULIA_AMDGPU_DISABLE_ARTIFACTS: "1"
NNLIB_TEST_AMDGPU: true
JULIA_NUM_THREADS: 4


- label: "Benchmarks"
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NNlibCUDAExt = "CUDA"
NNlibCUDACUDNNExt = ["CUDA", "cuDNN"]

[compat]
AMDGPU = "0.4.8"
AMDGPU = "0.4.8, 0.5"
Adapt = "3.2"
Atomix = "0.1"
ChainRulesCore = "1.13"
Expand Down
2 changes: 1 addition & 1 deletion test/ext_amdgpu/dropout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@test size(@inferred dropout(x, 0.2; dims=2)) == (3, 4)
@test size(@inferred dropout(x, 0.3; dims=(1, 2))) == (3, 4)

rng = AMDGPU.rocRAND.default_rng()
rng = AMDGPU.rocrand_rng()
@test size(@inferred dropout(rng, x, 0.1)) == (3, 4)
@test size(@inferred dropout(rng, x, 0.1; dims=2)) == (3, 4)

Expand Down
16 changes: 2 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,13 @@ end
if get(ENV, "NNLIB_TEST_AMDGPU", "false") == "true"
import Pkg
test_info = Pkg.project()
# Add MIOpen_jll to AMDGPU.
Pkg.develop("AMDGPU")
Pkg.activate(joinpath(Pkg.devdir(), "AMDGPU"))
Pkg.add("MIOpen_jll")
Pkg.update()
# Update test project.
Pkg.activate(test_info.path)
Pkg.update()

using AMDGPU
if AMDGPU.functional()
@testset "ROCBackend" begin
nnlib_testsuite(ROCBackend)
AMDGPU.synchronize(; blocking=false)
end
else
@info "AMDGPU.jl is not functional. Skipping test suite for ROCBackend."
Expand All @@ -108,21 +102,15 @@ end
if get(ENV, "NNLIB_TEST_AMDGPU", "false") == "true"
import Pkg
test_info = Pkg.project()
# Add MIOpen_jll to AMDGPU.
Pkg.develop("AMDGPU")
Pkg.activate(joinpath(Pkg.devdir(), "AMDGPU"))
Pkg.add("MIOpen_jll")
Pkg.update()
# Update test project.
Pkg.activate(test_info.path)
Pkg.update()

using AMDGPU
AMDGPU.versioninfo()
if AMDGPU.functional() && AMDGPU.functional(:MIOpen)
@show AMDGPU.MIOpen.version()
@testset "AMDGPU" begin
include("ext_amdgpu/runtests.jl")
AMDGPU.synchronize(; blocking=false)
end
else
@info "AMDGPU.jl package is not functional. Skipping AMDGPU tests."
Expand Down

0 comments on commit 91534e1

Please sign in to comment.