Repository navigation
Description
Part of #2077.
Problem
cuda_core/tests/example_tests/test_samples.py skips a sample when any requirement in its PEP 723 dependencies header is unmet. Three cuda_core samples declare requirements that no CI environment can satisfy, so they skip everywhere regardless of what else gets installed:
| Sample | Header requirement | Why it can't be met |
|---|---|---|
samples/cuda_core/processCheckpoint/processCheckpoint.py |
cuda-python>=13.0.0,<13.3.0 |
every CUDA 13 row has cuda-bindings 13.5.x |
samples/cuda_core/tmaTensorMap/tmaTensorMap.py |
nvidia-cuda-cccl-cu12 |
a CUDA 12 package in a sample that requires cuda-python>=13.0.0 and cupy-cuda13x |
samples/cuda_core/pageRank/pageRank.py |
cuda-core<1.0.0 |
main is cuda-core 1.3.x |
The <13.3.0 cap on processCheckpoint dates from the sample migration (#2959), and nothing records why it was added.
Fix
For each sample, either correct the pin or document why it is needed:
processCheckpoint: remove the<13.3.0cap, unless the sample really is incompatible with newer bindings. In that case, fix the sample.tmaTensorMap: switch to the CUDA 13 CCCL package, or drop it ifcuda.pathfinder.find_nvidia_header_directory("cccl")can find the headers from the CTK.pageRank: replacecuda-core<1.0.0with a lower bound, as the other samples use.
tmaTensorMap also needs CuPy, and pageRank also needs RAPIDS (cudf-cu13, cugraph-cu13, dask-cuda). No standard CI job installs those, so this issue alone won't make the samples run; #3578 covers that.
Done when
The three headers declare satisfiable requirements, and each sample skips only for a missing package that #3578 tracks. processCheckpoint has no such package, so it should run on Linux CUDA 13 rows where the checkpoint API is available.
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.
-
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>). -
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. -
-
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