Skip to content

CI: install the packages never-run samples need in the nightly-pytorch job #3578

Todo

Description

@mdboom

Part of #2077.

Summary

cuda_core/tests/example_tests/test_samples.py skips a sample when a requirement in its PEP 723 dependencies header is missing. The nightly-pytorch job is the nightly environment that runs the samples: it runs tests/test_utils.py tests/example_tests/ after installing PyTorch plus the test-cu13 dependency group, which includes cupy-cuda13x. Three samples already pass there.

The never-run samples below skip in that job only because a few more packages aren't installed. All of them are on PyPI. Installing them in the same job's environment (the nightly-pytorch branch of ci/tools/run-tests) would let these samples run nightly.

What each sample is missing on the nightly-pytorch CUDA 13 rows

Sample Missing in nightly-pytorch (CTK 13.0.2 / 13.2.2) PyPI wheels
binarySearch, cudaComputeLambdas cuda-cccl[cu13] Linux x86_64/aarch64, Windows
parallelReduction, prefixSum, reductionMultiBlockCG cuda-cccl same
matrixMulSharedMem nvmath-python[cu13] Linux x86_64/aarch64, Windows
simplePrint numba-cuda>=0.29, and on CTK 13.0.2 rows also nvidia-nvjitlink>=13.2 Linux x86_64/aarch64, Windows
customTensorFlowKernel tensorflow 2.21.0: Linux x86_64/aarch64, Windows, macOS; Python 3.10–3.13
glInteropFluidNumbaCudaMlir numba-cuda-mlir, plus a GL context (#3576) Linux x86_64/aarch64, Windows
multiGPUGradientAverage mpi4py and Open MPI's mpirun; it also needs 2 GPUs (#3584) mpi4py: all platforms; openmpi: Linux, macOS
pageRank RAPIDS (cudf-cu13, cugraph-cu13, dask-cuda). #3601 replaces its cuda-core<1.0.0 pin. Linux x86_64/aarch64 only
tmaTensorMap nvidia-cuda-cccl>=13.0.0, the CUDA 13 CCCL headers (#3601 corrects the CUDA 12 package name it declared). It has CuPy already, and waives below compute capability 9.0. Linux x86_64/aarch64, Windows

Proposal

Add these packages to the nightly-pytorch install in ci/tools/run-tests for the CUDA 13 rows, in the same single pip install call so pip resolves them together with torch:

  • cuda-cccl[cu13] and nvmath-python[cu13].
  • The cccl extra on the existing cuda-toolkit[cudart]==${TEST_CUDA_MAJOR_MINOR}.* requirement, which installs nvidia-cuda-cccl matching the row's toolkit, for tmaTensorMap. The nightly-numba-cuda-mlir branch already installs cuda-toolkit[...,cccl] this way.
  • numba-cuda[cu13], with the same numba<0.67 / numpy<2.5 pins the nightly-numba-cuda branch uses. simplePrint will then run on the CTK 13.2.2 rows; leave the CTK 13.0.2 rows' nvJitLink alone rather than upgrading it past the toolkit.
  • numba-cuda-mlir[cu13], after checking that it installs and imports alongside numba-cuda. If it doesn't, install it on only one of the rows. The sample also needs the headless GL work in samples: run the cuda.core GL interop samples headless (EGL) instead of waiving without DISPLAY #3576.
  • tensorflow: the plain PyPI wheel, not tensorflow[and-cuda], which pulls CUDA 12 libraries (nvidia-*-cu12, cuDNN 9). The sample moves data numpy → CuPy and launches its kernel through cuda.core, so TensorFlow only needs to run tf.py_function and the reference ops. The CPU build is enough for that, so it doesn't drag a second CUDA major into a CUDA 13 environment. nightly-pytorch uses Python 3.12, which TensorFlow 2.21 supports.
  • mpi4py and openmpi (Linux): the harness launches multiGPUGradientAverage with mpirun --allow-run-as-root -np 2 (cuda_core/tests/example_tests/test_args.json), which is Open MPI syntax. The sample runs once a nightly-pytorch row has 2 GPUs (CI: hardware needed for tests that never run (3+ GPUs, NVLink, Tegra/DLA, vGPU) #3584).
  • cudf-cu13, cugraph-cu13, and dask-cuda (RAPIDS, Linux rows only; there are no Windows wheels). samples: fix unsatisfiable dependency pins and depend on cuda-core[cu13] #3601 replaces pageRank's cuda-core<1.0.0 pin; current RAPIDS resolves with cuda-core 1.x.

TensorFlow: PyPI, not conda-forge

The existing note in cuda_core/pixi.toml says conda-forge's TensorFlow build needs an executable stack and fails on hardened hosts. That applies to the conda-forge package only; the same note recommends pip install tensorflow instead. CI installs from PyPI inside ubuntu:24.04 containers (glibc 2.39), so that problem doesn't apply. Confirm on the first nightly run.

Not in scope

Done when

The packages above are installed in the nightly-pytorch job, the samples pass there (multiGPUGradientAverage once a 2-GPU row exists, see #3584), and their keys are removed from the test_samples.py marker.

Guidance for PRs that address this issue

  • When making a fix that allows a test to run in CI, remove the comment about the test not running in CI from the code.
  • When making a test run only in nightly CI, we need to concretely confirm that in nightly CI. Include instructions in the PR about how to kick off a nightly run for the specific PR in order to test that (see below).
  • For every PR note that the reviewer should feel free to push commits directly to the PR to improve things. @mdboom does not have the bandwidth to shepard each of them through.
  • Every PR should include a way to confirm automatically that the tests are now running in at least one CI configuration.

Running the nightly test suites for a PR

The nightly workflow can test a PR's own wheels and tests, but it has to be started by hand. Starting it needs write access to NVIDIA/cuda-python, so ask a maintainer if you don't have it.

  1. Wait for the PR's CI workflow run to finish successfully, and note its run ID, the number in its URL (.../actions/runs/<run-id>).

  2. Start CI: Nightly optional-deps on the PR's mirror branch, with that run ID. Either:

    • In the GitHub UI: Actions → CI: Nightly optional-deps → Run workflow. Set Use workflow from to pull-request/<PR number>, enter the run ID in the run-ID field, and leave the link-checker-only box unchecked.

    • From the command line:

      gh workflow run ci-nightly.yml --repo NVIDIA/cuda-python --ref pull-request/<PR number> -f run-id=<run-id>
      

    Supply the run ID. Without it, the nightly run tests main's latest wheels and tests, not the PR's.

  3. Link the nightly run in the PR. Then confirm that the affected tests ran and passed, rather than skipped, in the relevant nightly jobs.

The nightly run tests the commit of that CI run. Repeat these steps after pushing changes that affect the nightly-only tests.

Activity

  1. added
    CI/CD
    test
    cuda.core
    example
    dependencies
    on Nov 25, 2026
  2. self-assigned this
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CI/CDcuda.coredependenciesexampletest

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions