Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AMDGPU compat to 0.5 #521

Merged
merged 6 commits into from
Jul 7, 2023
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
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