From 7896143d138594808df36b32ec3ee6a11e81ec7b Mon Sep 17 00:00:00 2001 From: mrava87 Date: Wed, 3 Jun 2026 20:43:05 +0100 Subject: [PATCH 1/4] ci: added GA for new runner --- .github/workflows/buildcupy1.yaml | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/buildcupy1.yaml diff --git a/.github/workflows/buildcupy1.yaml b/.github/workflows/buildcupy1.yaml new file mode 100644 index 00000000..ddd412eb --- /dev/null +++ b/.github/workflows/buildcupy1.yaml @@ -0,0 +1,50 @@ +name: PyLops Testing (CuPy) + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + - dev + +jobs: + build: + runs-on: self-hosted + steps: + - name: Check out source repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Install uv with Python 3.11 + uses: astral-sh/setup-uv@v6 + with: + python-version: 3.11 + - name: Install dependencies and pylops + run: | + uv sync --locked --extra advanced \ + --extra stat --extra gpu-cu12 \ + --extra deep-cu128 --all-groups + echo "done!" + - name: Install CUDA 12.8 toolkit + run: | + # Currently, the NVIDIA GPU drivers on the self-hosted runner + # and the CUDA installation in CUDA_HOME require different PTX versions + # (8.7 and 8.8, respectively). CUDA and NVCC are temporarely + # installed in the uv environment, and the CUDA paths are set in + # the test command, to work around this issue. + uv add nvidia-cuda-nvcc-cu12==12.8.* + # Numba resolves libNVVM via CUDA_HOME and needs a versioned + # libnvvm.so.N (the pip wheel only ships a bare libnvvm.so), so + # add the symlink once here against the wheel-provided toolkit. + ln -sf libnvvm.so .venv/lib/python3.11/site-packages/nvidia/cuda_nvcc/nvvm/lib64/libnvvm.so.4 + echo "done!" + - name: Test with pytest + run: | + # Use the pip-installed CUDA 12.8 toolkit (matches the 12.8 driver), + # not any system CUDA on the runner, so numba emits PTX <= 8.7. + export CUDA_HOME="$PWD/.venv/lib/python3.11/site-packages/nvidia/cuda_nvcc" + export CUPY_PYLOPS=1 + export TEST_CUPY_PYLOPS=1 + uv run pytest --color=yes pytests/ + echo "done!" From 2b3ba21ef6968a1a852228837c05fc2bc1d2ecfd Mon Sep 17 00:00:00 2001 From: mrava87 Date: Wed, 3 Jun 2026 21:08:54 +0100 Subject: [PATCH 2/4] ci: add label to GA --- .github/workflows/buildcupy1.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildcupy1.yaml b/.github/workflows/buildcupy1.yaml index ddd412eb..de39c03d 100644 --- a/.github/workflows/buildcupy1.yaml +++ b/.github/workflows/buildcupy1.yaml @@ -1,4 +1,4 @@ -name: PyLops Testing (CuPy) +name: PyLops Testing (CuPy1) on: pull_request: @@ -10,7 +10,9 @@ on: jobs: build: - runs-on: self-hosted + runs-on: + - self-hosted + - exouser steps: - name: Check out source repository uses: actions/checkout@v6 From 18368061c8e6b2181e0cbea8b205e8486f4e71bf Mon Sep 17 00:00:00 2001 From: mrava87 Date: Wed, 3 Jun 2026 21:44:51 +0100 Subject: [PATCH 3/4] ci: force cuda 12.2 --- .github/workflows/buildcupy1.yaml | 36 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/buildcupy1.yaml b/.github/workflows/buildcupy1.yaml index de39c03d..5625c4e9 100644 --- a/.github/workflows/buildcupy1.yaml +++ b/.github/workflows/buildcupy1.yaml @@ -24,27 +24,31 @@ jobs: python-version: 3.11 - name: Install dependencies and pylops run: | - uv sync --locked --extra advanced \ - --extra stat --extra gpu-cu12 \ - --extra deep-cu128 --all-groups + uv sync --locked --extra advanced \ + --extra stat --extra gpu-cu12 \ + --extra deep-cu128 --all-groups echo "done!" - - name: Install CUDA 12.8 toolkit + - name: Install CUDA 12.2 toolkit run: | - # Currently, the NVIDIA GPU drivers on the self-hosted runner - # and the CUDA installation in CUDA_HOME require different PTX versions - # (8.7 and 8.8, respectively). CUDA and NVCC are temporarely - # installed in the uv environment, and the CUDA paths are set in - # the test command, to work around this issue. - uv add nvidia-cuda-nvcc-cu12==12.8.* - # Numba resolves libNVVM via CUDA_HOME and needs a versioned - # libnvvm.so.N (the pip wheel only ships a bare libnvvm.so), so - # add the symlink once here against the wheel-provided toolkit. - ln -sf libnvvm.so .venv/lib/python3.11/site-packages/nvidia/cuda_nvcc/nvvm/lib64/libnvvm.so.4 + # Install a consistent CUDA 12.2 toolchain in the uv environment so + # NVCC/NVRTC/Runtime agree with each other and numba can resolve + # both libnvvm and libcudart from a single CUDA_HOME. + uv add nvidia-cuda-nvcc-cu12==12.2.128 + uv add nvidia-cuda-runtime-cu12==12.2.140 + uv add nvidia-cuda-nvrtc-cu12==12.2.140 + # The wheel layout splits nvvm (in cuda_nvcc) and cudart (in cuda_runtime), + # so create the lib64 view expected by numba in CUDA_HOME. + CUDA_NVCC_ROOT="$PWD/.venv/lib/python3.11/site-packages/nvidia/cuda_nvcc" + CUDA_RUNTIME_ROOT="$PWD/.venv/lib/python3.11/site-packages/nvidia/cuda_runtime" + mkdir -p "$CUDA_NVCC_ROOT/lib64" + ln -sf libnvvm.so "$CUDA_NVCC_ROOT/nvvm/lib64/libnvvm.so.4" + ln -sf "$CUDA_RUNTIME_ROOT/lib/libcudart.so.12" "$CUDA_NVCC_ROOT/lib64/libcudart.so.12" + ln -sf libcudart.so.12 "$CUDA_NVCC_ROOT/lib64/libcudart.so" echo "done!" - name: Test with pytest run: | - # Use the pip-installed CUDA 12.8 toolkit (matches the 12.8 driver), - # not any system CUDA on the runner, so numba emits PTX <= 8.7. + # Use the pip-installed pinned CUDA 12.2 toolchain from uv, not any + # system CUDA on the runner. export CUDA_HOME="$PWD/.venv/lib/python3.11/site-packages/nvidia/cuda_nvcc" export CUPY_PYLOPS=1 export TEST_CUPY_PYLOPS=1 From 068e443ca6c2ecb55fcc03403ec3c2396754164a Mon Sep 17 00:00:00 2001 From: mrava87 Date: Wed, 3 Jun 2026 21:49:38 +0100 Subject: [PATCH 4/4] ci: add label to buildcupy --- .github/workflows/buildcupy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildcupy.yaml b/.github/workflows/buildcupy.yaml index 56f917f8..b2dd3a34 100644 --- a/.github/workflows/buildcupy.yaml +++ b/.github/workflows/buildcupy.yaml @@ -10,7 +10,9 @@ on: jobs: build: - runs-on: self-hosted + runs-on: + - self-hosted + - exouser steps: - name: Check out source repository uses: actions/checkout@v6