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

Refactor tests #64

Merged
merged 1 commit into from
Apr 9, 2024
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
2 changes: 0 additions & 2 deletions .github/workflows/ci-gpu-AMD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ jobs:
module load julia/1.9.1
module load rocm
julia --project -e 'using Pkg; Pkg.instantiate()'
julia --project -e 'using Pkg; Pkg.add(name="AMDGPU", version="v0.8.6")'
julia --project -e 'using AMDGPU; AMDGPU.use_artifacts!(false)'
julia --project -e 'using JACC.JACCPreferences; JACCPreferences.set_backend("AMDGPU")'

- name: Test
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-gpu-NVIDIA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
if: steps.check.outputs.triggered == 'true'
run: |
julia --project -e 'using Pkg; Pkg.instantiate()'
julia --project -e 'using Pkg; Pkg.add(name="CUDA", version="v5.1.1")'
julia --project -e 'using CUDA; CUDA.set_runtime_version!(local_toolkit=true)'
julia --project -e 'using JACC.JACCPreferences; JACCPreferences.set_backend("CUDA")'

- name: Test
Expand Down
11 changes: 2 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ JACCCUDA = ["CUDA"]
JACCONEAPI = ["oneAPI"]

[compat]
AMDGPU = "0.8"
CUDA = "5"
Preferences = "1.4.0"
julia = "1.9.0"

[extras]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["AMDGPU", "CUDA", "oneAPI", "Test"]
9 changes: 9 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import JACC

using Pkg

const backend = JACC.JACCPreferences.backend

@static if backend == "cuda"
Pkg.add(name="CUDA", version="v5.1.1")
@show "CUDA backend loaded"
include("tests_cuda.jl")

elseif backend == "amdgpu"
Pkg.add(name="AMDGPU", version="v0.8.6")
@show "AMDGPU backend loaded"
include("tests_amdgpu.jl")

elseif backend == "oneapi"
Pkg.add("oneAPI")
@show "OneAPI backend loaded"
include("tests_oneapi.jl")

Expand Down