diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 415ceaa4..1e4522cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,11 @@ env: JULIA_NUM_THREADS: 2 jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }}${{ matrix.ad == false && ' - no AD' || '' }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.version == 'pre' }} env: - PS_TEST_AD: ${{ matrix.version == 'pre' && '0' || '1' }} # No Enzyme (automatic differentiation tests) on the upcoming Julia release: its GPUCompiler/LLVM dependencies typically lag behind. + PS_TEST_AD: ${{ (matrix.version == 'pre' || matrix.ad == false) && '0' || '1' }} # No Enzyme (automatic differentiation tests) on the upcoming Julia release (its GPUCompiler/LLVM dependencies typically lag behind) and in the job testing KernelAbstractions 0.10 (requires LLVM.jl 10, which Enzyme does not support yet). PS_TEST_BACKEND: ${{ startsWith(matrix.os, 'macOS') && 'Metal' || '' }} # The macOS runners (Apple silicon) have a functional Metal GPU: the test runner installs Metal into the test environment and the Metal tests must run. strategy: fail-fast: false @@ -36,8 +36,11 @@ jobs: os: - ubuntu-latest - macOS-latest # NOTE: the architecture of the runner is used (aarch64), not x64 (Rosetta). + ad: + - true # Tests of automatic differentiation (Enzyme in the test environment) include: - - {version: 'pre', os: ubuntu-latest} # Upcoming Julia release (allowed to fail) + - {version: '1', os: ubuntu-latest, ad: false} # KernelAbstractions 0.10 (resolved only without Enzyme, see PS_TEST_AD) + - {version: 'pre', os: ubuntu-latest} # Upcoming Julia release (allowed to fail) steps: - uses: actions/checkout@v7 - uses: julia-actions/setup-julia@v3 diff --git a/Project.toml b/Project.toml index b7694dce..cf15ac9a 100644 --- a/Project.toml +++ b/Project.toml @@ -31,7 +31,7 @@ AMDGPU = "1, 2" CUDA = "3.12, 4, 5, 6" CellArrays = "0.3.2" Enzyme = "0.12, 0.13" -KernelAbstractions = "0.9" +KernelAbstractions = "0.9, 0.10" MacroTools = "0.5" Metal = "1.2" Polyester = "0.7" diff --git a/ci/cscs-mi300.yml b/ci/cscs-mi300.yml index dfc31f4b..445d9deb 100644 --- a/ci/cscs-mi300.yml +++ b/ci/cscs-mi300.yml @@ -16,6 +16,7 @@ include: JULIA_AMDGPU_HIP_MUST_LOAD: '1' JULIA_NUM_THREADS: 2 PS_TEST_BACKEND: 'AMDGPU' # The test runner installs AMDGPU into the test environment; fail instead of skipping the GPU tests if it is not functional. + PS_TEST_AD: '0' # No Enzyme: the newest AMDGPU (2.9) and KernelAbstractions (0.10) require LLVM.jl 10, which Enzyme does not support yet; the tests of automatic differentiation on AMD GPUs run in the MI250 job (AMDGPU 2.8, KernelAbstractions 0.9). PS_TEST_FILES: '' # Test files to run (default: all). script: - ulimit -c 0 diff --git a/docs/src/testing.md b/docs/src/testing.md index fccee34f..36a19c0a 100644 --- a/docs/src/testing.md +++ b/docs/src/testing.md @@ -48,6 +48,6 @@ The test environment of `Pkg.test` is temporary, so the installation is repeated For pull requests by other contributors, a maintainer starts the pipelines by commenting `cscs-ci run`. - Each job sets `PS_TEST_BACKEND` to the GPU backend it tests (`CUDA` on Daint, `AMDGPU` on Beverin and `Metal` on the macOS runners of GitHub Actions); the Linux jobs of GitHub Actions test the CPU backends only. + Each job sets `PS_TEST_BACKEND` to the GPU backend it tests (`CUDA` on Daint, `AMDGPU` on Beverin and `Metal` on the macOS runners of GitHub Actions); the Linux jobs of GitHub Actions test the CPU backends only. The newest KernelAbstractions (0.10) and AMDGPU (2.9) require LLVM.jl 10, which Enzyme does not support yet: one Linux job and the MI300 job run without Enzyme (`PS_TEST_AD=0`) to test them, the other jobs test with Enzyme (KernelAbstractions 0.9). Coverage of all jobs is uploaded to [Codecov](https://app.codecov.io/gh/omlins/ParallelStencil.jl) (flags `cpu`, `gh200`, `mi250` and `mi300`).