From 1dc3be5e312810f5a177953bd204f54e2f2a71b1 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 28 Sep 2026 12:13:09 +0200 Subject: [PATCH] CI: test OpenCL.jl only on Buildkite, and soft-fail back ends that can't be installed - run OpenCL.jl's KernelAbstractions and KernelInterface tests on PoCL (SPIR-V and OpenCL C) next to NVIDIA in the Buildkite OpenCL step, instead of PoCL in a separate GitHub Actions job that installed the same branch again; - like GPUCompiler's downstream tests, exit with status 3 (a soft failure) when a back end's branch can't be installed together with this KernelAbstractions, e.g. while it doesn't support a new KernelInterface yet; test failures still fail the build. --- .buildkite/pipeline.yml | 22 ++++++++++++-------- .github/workflows/ci.yml | 44 ---------------------------------------- 2 files changed, 14 insertions(+), 52 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8b1b7b029..e0bf4711d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,7 +1,11 @@ # Tests of the KernelAbstractions-related parts of the GPU back-ends. Draft pull requests skip # them, unless selected by name in the last commit message: `[only cuda]`, `[only metal, oneapi]` # or `[only tests]` for all of them. `[skip amdgpu]` or `[skip tests]` does the opposite. -# (`opencl` selects the OpenCL.jl tests on CUDA hardware.) +# (`opencl` selects the OpenCL.jl tests, on PoCL and on CUDA hardware.) +# +# A back end whose branch can't be installed together with this KernelAbstractions (e.g. +# because it doesn't support this KernelInterface yet) soft-fails with exit status 3, +# instead of failing the build; test failures still fail it. steps: - label: "CUDA Julia {{matrix.version}}" matrix: @@ -26,7 +30,7 @@ steps: url="https://github.com/JuliaGPU/CUDA.jl" rev="intrinsics" subdirs = ["CUDACore", "CUDATools", "lib/cusolver", "lib/curand", "lib/cublas", "lib/cufft", "lib/cusparse", "lib/cupti", "lib/nvml", "lib/custatevec", "lib/cudnn", "lib/cutensor", "lib/cutensornet"] - Pkg.add([(;url, rev); [(; url, rev, subdir) for subdir in subdirs]])' + Pkg.add([(;url, rev); [(; url, rev, subdir) for subdir in subdirs]])' || exit 3 julia -e 'println("+++ :julia: Running tests") using Pkg @@ -94,7 +98,7 @@ steps: PackageSpec(; name="KernelInterface", path=joinpath(pwd(), "lib", "KernelInterface"))])' || exit 3 julia -e 'println("--- :julia: Developing Metal") using Pkg - Pkg.add([(; url="https://github.com/JuliaGPU/Metal.jl", rev="kaintr")])' + Pkg.add([(; url="https://github.com/JuliaGPU/Metal.jl", rev="kaintr")])' || exit 3 julia -e 'println("+++ :julia: Running tests") using Pkg Pkg.test("Metal"; coverage=true, test_args=["kernelabstractions", "kernelinterface"])' @@ -131,7 +135,7 @@ steps: julia -e 'println("--- :julia: Developing oneAPI") using Pkg Pkg.add(url="https://github.com/JuliaGPU/AcceleratedKernels.jl", rev="main") - Pkg.add(url="https://github.com/christiangnrd/oneAPI.jl", rev="intrinsics")' + Pkg.add(url="https://github.com/christiangnrd/oneAPI.jl", rev="intrinsics")' || exit 3 julia -e 'println("+++ :julia: Running tests") using Pkg @@ -170,7 +174,7 @@ steps: julia -e 'println("--- :julia: Developing AMDGPU") using Pkg Pkg.add(url="https://github.com/JuliaGPU/AcceleratedKernels.jl", rev="main") - Pkg.add(url="https://github.com/christiangnrd/AMDGPU.jl", rev="intrinsics")' + Pkg.add(url="https://github.com/christiangnrd/AMDGPU.jl", rev="intrinsics")' || exit 3 julia -e 'println("+++ :julia: Running tests") using Pkg @@ -188,7 +192,7 @@ steps: JULIA_PROJECT: "@amdgpu" JULIA_NUM_THREADS: 4 - - label: "OpenCL (CUDA) Julia {{matrix.version}}" + - label: "OpenCL Julia {{matrix.version}}" matrix: setup: version: @@ -209,11 +213,13 @@ steps: julia -e 'println("--- :julia: Developing OpenCL") using Pkg Pkg.add(url="https://github.com/JuliaGPU/OpenCL.jl", rev="intrinsics") - Pkg.develop(; name="SPIRVIntrinsics")' + Pkg.develop(; name="SPIRVIntrinsics")' || exit 3 julia -e 'println("+++ :julia: Running tests") using Pkg - Pkg.test("OpenCL"; coverage=true, test_args=`--platform=nvidia nvidia/kernelabstractions nvidia/kernelinterface`)' + tests = ["$(target)/$(test)" for target in ("pocl", "poclc", "nvidia") + for test in ("kernelabstractions", "kernelinterface")] + Pkg.test("OpenCL"; coverage=true, test_args=tests)' agents: queue: "cuda" if: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a2b0fee7..8baca80ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,50 +217,6 @@ jobs: project: lib/KernelInterface annotate: true - OpenCL: - name: OpenCL (POCL) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1.11', '1.12', '1.13', 'nightly'] - steps: - - uses: actions/checkout@v7 - - uses: julia-actions/install-juliaup@v3 - with: - channel: ${{ matrix.version }} - - uses: julia-actions/cache@v3 - # KernelInterface is dev'ed explicitly here for the same reason as in the CI job - # above: Julia 1.10 does not support `[sources]`. - - name: Dev KernelInterface - shell: bash - run: julia -e 'using Pkg; Pkg.activate("."); Pkg.develop(; path="lib/KernelInterface")' - - uses: julia-actions/julia-buildpkg@v1 - continue-on-error: ${{ matrix.version == 'nightly' }} - - name: "Instantiating project" - run: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop([PackageSpec(; name="KernelAbstractions", path=pwd()), - PackageSpec(; name="KernelInterface", path=joinpath(pwd(), "lib", "KernelInterface"))])' || exit 3 - - name: "Developing OpenCL" - continue-on-error: ${{ matrix.version == 'nightly' }} - run: | - julia -e 'println("--- :julia: Developing OpenCL") - using Pkg - Pkg.add(url="https://github.com/JuliaGPU/OpenCL.jl", rev="intrinsics") - Pkg.develop(; name="SPIRVIntrinsics")' - - name: "Running tests" - continue-on-error: ${{ matrix.version == 'nightly' }} - run: | - julia -e 'println("+++ :julia: Running tests") - using Pkg - Pkg.test("OpenCL"; coverage=true, test_args=`--platform=pocl pocl/kernelabstractions poclc/kernelabstractions pocl/kernelinterface poclc/kernelinterface`)' - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v7 - with: - files: lcov.info - docs: name: Documentation runs-on: ubuntu-latest