Skip to content

Commit

Permalink
Bump AMDGPU compat versions (#81)
Browse files Browse the repository at this point in the history
* AMD version compat updated

* maybe julia version is the issue?

* maybe julia version was causing the issue?

* check GPU availability differently

* manual env variables

* debug ci
  • Loading branch information
sshin23 authored Apr 19, 2024
1 parent db3f47a commit eadae25
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.9']
julia-version: ['1']
julia-arch: [x64]
os: [ubuntu-latest,macos-latest,windows-latest]

Expand All @@ -19,10 +19,14 @@ jobs:
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
test-self-hosted:
env:
EXAMODELS_TEST_CUDA: 1
EXAMODELS_TEST_AMDGPU: 1
EXAMODELS_TEST_ONEAPI: 1
runs-on: self-hosted
strategy:
matrix:
julia-version: ['1.9']
julia-version: ['1']
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ExaModelsIpopt = ["MathOptInterface", "NLPModelsIpopt"]
ExaModelsMadNLP = ["MadNLP", "MathOptInterface"]

[compat]
AMDGPU = "0.7"
AMDGPU = "0.7, 0.8"
CUDA = "5"
KernelAbstractions = "0.9"
NLPModels = "0.18, 0.19, 0.20"
Expand Down
12 changes: 7 additions & 5 deletions test/backends.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
const BACKENDS = Any[nothing, CPU()]

if CUDA.has_cuda()
if haskey(ENV, "EXAMODELS_TEST_CUDA")
using CUDA
push!(BACKENDS, CUDABackend())
@info "including CUDA"
else
@info "excluding CUDA"
end

if AMDGPU.has_rocm_gpu()
if haskey(ENV, "EXAMODELS_TEST_AMDGPU")
using AMDGPU
push!(BACKENDS, ROCBackend())
@info "including AMDGPU"
else
@info "excluding AMDGPU"
end

try
oneAPI.oneL0.zeInit(0)
if haskey(ENV, "EXAMODELS_TEST_ONEAPI")
using oneAPI
push!(BACKENDS, oneAPIBackend())
@info "including oneAPI"
catch e
else
@info "excluding oneAPI"
end
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test, ExaModels
using Random
using KernelAbstractions, CUDA, AMDGPU, oneAPI
using KernelAbstractions

Random.seed!(0)

Expand Down

0 comments on commit eadae25

Please sign in to comment.