Skip to content

Commit b578a28

Browse files
authored
restore conda-python-tests on CUDA 13 (#395)
Closes #296 Restores CUDA 13 conda test CI jobs, now that there are conda-forge PyTorch packages with CUDA 13 support (conda-forge/pytorch-cpu-feedstock#477) Also modifies `pytorch` conda dependency to meet these requirements: * `cugraph-pyg` must be installable on a system without a GPU * `cugraph-pyg`'s tests require CUDA-enabled builds of PyTorch With the following mix of things: * add a `require_gpu` matrix filter in `dependencies.yaml` which pulls in `pytorch-gpu` opted-into in test CI jobs but otherwise not - *`conda-forge::pytorch-gpu` is a metapackage that forces the installation of CUDA variants of `conda-forge::pytorch`... that should replace the "accidentally pulled in a CPU-only variant" case with a loud, clear conda solver error* * depend on `mkl` in the test x86_64 environment but without version constraints - *allow `pytorch` to declare its range of compatible `mkl` versions* - *this still prevents OpenBLAS variants from getting installed, which I think was part of the goal of #161* - *keeping this out of `cugraph-pyg`'s dependencies still makes it possible to install alongside `nomkl`, even though that combination is untested* * add comments in the `cugraph-pyg` conda recipe explaining why it doesn't depend on `pytorch-gpu` I hope this will be a relatively future-proof way to guarantee CI here keeps picking up the PyTorch versions this project wants to tet against. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Alex Barghi (https://github.com/alexbarghi-nv) - Bradley Dice (https://github.com/bdice) URL: #395
1 parent 7e914aa commit b578a28

5 files changed

Lines changed: 20 additions & 18 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,7 @@ jobs:
184184
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda
185185
with:
186186
build_type: pull-request
187-
# TODO: remove the CUDA 13 exclusion here once there are pytorch CUDA 13 packages
188-
# ref: https://github.com/pytorch/pytorch/issues/159779
189-
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | startswith("12"))))
187+
matrix_filter: map(select(.ARCH == "amd64"))
190188
script: ci/test_python.sh
191189
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
192190
docs-build:

.github/workflows/test.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ jobs:
4242
date: ${{ inputs.date }}
4343
script: ci/test_python.sh
4444
sha: ${{ inputs.sha }}
45-
# TODO: remove the CUDA 13 exclusion here once there are pytorch CUDA 13 packages
46-
# ref: https://github.com/pytorch/pytorch/issues/159779
47-
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | startswith("12"))))
45+
matrix_filter: map(select(.ARCH == "amd64"))
4846
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
4947
wheel-tests-pylibwholegraph:
5048
secrets: inherit

ci/test_python.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION.
2+
# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION.
33
# SPDX-License-Identifier: Apache-2.0
44

55
set -euo pipefail
@@ -38,7 +38,7 @@ if [[ "${RUNNER_ARCH}" != "ARM64" ]]; then
3838
rapids-dependency-file-generator \
3939
--output conda \
4040
--file-key test_cugraph_pyg \
41-
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
41+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};require_gpu=true" \
4242
--prepend-channel "${CPP_CHANNEL}" \
4343
--prepend-channel "${PYTHON_CHANNEL}" \
4444
| tee env.yaml
@@ -76,7 +76,7 @@ if [[ "${RUNNER_ARCH}" != "ARM64" ]]; then
7676
rapids-dependency-file-generator \
7777
--output conda \
7878
--file-key test_pylibwholegraph \
79-
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
79+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};require_gpu=true" \
8080
--prepend-channel "${CPP_CHANNEL}" \
8181
--prepend-channel "${PYTHON_CHANNEL}" \
8282
| tee env.yaml

conda/recipes/cugraph-pyg/recipe.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
22
# SPDX-License-Identifier: Apache-2.0
33
schema_version: 1
44

@@ -37,8 +37,11 @@ requirements:
3737
- pylibcugraph =${{ minor_version }}
3838
- pylibwholegraph =${{ minor_version }}
3939
- python
40+
# This is intentionally spelled 'pytorch' (not 'pytorch-gpu' and not using build string selectors)
41+
# because we want it to be possible to at least install `cugraph-pyg` in an environment without a GPU,
42+
# to support use cases like building container images.
4043
- pytorch >=2.3
41-
- pytorch_geometric >=2.5,<2.7
44+
- pytorch_geometric >=2.5,<2.8
4245

4346
tests:
4447
- python:

dependencies.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ files:
6464
- depends_on_sentence_transformers
6565
- py_version
6666
- test_python_common
67-
- depends_on_mkl
6867
- depends_on_pylibwholegraph
6968
- depends_on_cugraph_pyg
7069
test_pylibwholegraph:
@@ -75,7 +74,6 @@ files:
7574
- depends_on_pytorch
7675
- py_version
7776
- test_python_common
78-
- depends_on_mkl
7977
- depends_on_pylibwholegraph
8078
- test_python_pylibwholegraph
8179
py_build_libwholegraph:
@@ -376,6 +374,16 @@ dependencies:
376374
- matrix:
377375
packages:
378376
- *pytorch_pip
377+
- output_types: [conda]
378+
matrices:
379+
# Prevent fallback to CPU-only pytorch when we want a CUDA variant.
380+
- matrix:
381+
require_gpu: "true"
382+
packages:
383+
- pytorch-gpu
384+
# Default to falling back to whatever 'pytorch' is pulled in via cugraph-pyg's dependencies.
385+
- matrix:
386+
packages:
379387
depends_on_nccl:
380388
common:
381389
- output_types: conda
@@ -648,8 +656,3 @@ dependencies:
648656
- output_types: conda
649657
packages:
650658
- cugraph-pyg==26.4.*,>=0.0.0a0
651-
depends_on_mkl:
652-
common:
653-
- output_types: conda
654-
packages:
655-
- mkl<2024.1.0

0 commit comments

Comments
 (0)