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

[buildkite] Add CI builds on GPUs #113

Merged
merged 13 commits into from
Nov 6, 2024
82 changes: 82 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
steps:
- label: "Nvidia GPUs -- CUDA.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.10"
agents:
queue: "juliagpu"
cuda: "*"
env:
EXAMODELS_TEST_CUDA: "TRUE"
command: |
julia --color=yes -e '
using Pkg
Pkg.add("CUDA")
Pkg.add("KernelAbstractions")
Pkg.add("NLPModels")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on how you want to run the tests.
If you just want to use runtests.jl, we can modify it.
But with the current pipeline.yml, we can also run specific and longer tests that target specific GPUs without environment variables.

I did something similar in Krylov.jl, using buildkite to run GPU tests separately from CPU tests, which is recommended to avoid occupying the GPUs for too long, allowing other users and repositories to access them.

Pkg.develop(path=".")
include("test/runtests.jl")'
timeout_in_minutes: 30

- label: "AMD GPUs -- AMDGPU.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.10"
agents:
queue: "juliagpu"
rocm: "*"
rocmgpu: "*"
env:
EXAMODELS_TEST_AMDGPU: "TRUE"
JULIA_NUM_THREADS: 4
JULIA_AMDGPU_CORE_MUST_LOAD: "1"
JULIA_AMDGPU_HIP_MUST_LOAD: "1"
JULIA_AMDGPU_DISABLE_ARTIFACTS: "1"
command: |
julia --color=yes -e '
using Pkg
Pkg.add("AMDGPU")
Pkg.add("KernelAbstractions")
Pkg.add("NLPModels")
Pkg.develop(path=".")
include("test/runtests.jl")'
timeout_in_minutes: 30

- label: "Intel GPUs -- oneAPI.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.10"
agents:
queue: "juliagpu"
intel: "*"
env:
EXAMODELS_TEST_ONEAPI: "TRUE"
command: |
julia --color=yes -e '
using Pkg
Pkg.add("oneAPI")
Pkg.add("KernelAbstractions")
Pkg.add("NLPModels")
Pkg.develop(path=".")
include("test/runtests.jl")'
timeout_in_minutes: 30

# - label: "Apple M1 GPUs -- Metal.jl"
# plugins:
# - JuliaCI/julia#v1:
# version: "1.10"
# agents:
# queue: "juliaecosystem"
# os: "macos"
# arch: "aarch64"
# env:
# EXAMODELS_TEST_METAL: "TRUE"
# command: |
# julia --color=yes --project -e '
# using Pkg
# Pkg.develop(path=".")
# Pkg.add("Metal")
# Pkg.add("KernelAbstractions")
# Pkg.instantiate()
# include("test/runtests.jl")'
# timeout_in_minutes: 30
21 changes: 0 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,3 @@ jobs:
version: ${{ matrix.julia-version }}
- 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']
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
Loading