From d927755015442fb9c2f4f0566384a68749c62b9e Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 5 Nov 2026 11:07:26 +0100 Subject: [PATCH] Upload GPUCompiler's failure dumps from the SPIR-V CI jobs When a kernel fails to compile or its SPIR-V fails to validate, GPUCompiler writes the module to a file to attach to a bug report. On CI that file was lost with the runner, which left a one-off SPIR-V validation failure in the host-kernel job impossible to debug. Upload these files as an artifact when the OpenCL or host-kernel jobs fail, both from where JuliaGPU/GPUCompiler.jl#1077 puts them and from where released versions do. --- .github/workflows/CI-CPU.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/CI-CPU.yml b/.github/workflows/CI-CPU.yml index 20081a52..39e29b5d 100644 --- a/.github/workflows/CI-CPU.yml +++ b/.github/workflows/CI-CPU.yml @@ -107,6 +107,19 @@ jobs: - name: Promote OpenCL to test dependency run: julia test/promote.jl opencl - uses: julia-actions/julia-runtest@v1 + # GPUCompiler writes the module of a failed back-end compilation or SPIR-V validation + # to $RUNNER_TEMP/gpucompiler-dumps (releases before JuliaGPU/GPUCompiler.jl#1077: to + # /tmp/jl_*), to attach to a bug report + - name: Upload compilation dumps + if: failure() + uses: actions/upload-artifact@v7 + with: + name: compilation-dumps-${{ github.job }}-${{ matrix.version }} + path: | + ${{ runner.temp }}/gpucompiler-dumps/ + /tmp/jl_*.bc + /tmp/jl_*.spv + if-no-files-found: ignore cpuKA: # KernelAbstractions 0.10 (unreleased, `main`) runs AcceleratedKernels' kernels on the host # backend, through PoCL; `--cpu-ka` tests them there. @@ -142,6 +155,19 @@ jobs: - name: Run tests # only the generic tests: the others, Aqua included, do not depend on the backend run: julia --project=test test/runtests.jl --cpu-ka cpu-ka/ + # GPUCompiler writes the module of a failed back-end compilation or SPIR-V validation + # to $RUNNER_TEMP/gpucompiler-dumps (releases before JuliaGPU/GPUCompiler.jl#1077: to + # /tmp/jl_*), to attach to a bug report + - name: Upload compilation dumps + if: failure() + uses: actions/upload-artifact@v7 + with: + name: compilation-dumps-${{ github.job }}-${{ matrix.version }} + path: | + ${{ runner.temp }}/gpucompiler-dumps/ + /tmp/jl_*.bc + /tmp/jl_*.spv + if-no-files-found: ignore docs: name: Documentation runs-on: ubuntu-latest