Repository navigation
Description
Part of #2077.
Problem
cuda_core/tests/test_checkpoint.py::TestCheckpointGpuMigration::test_rotation_migrates_context and ::test_swap_identical_gpus never run in CI.
On Windows they skip because the checkpoint API is Linux-only; on single-GPU runners they skip because they need 2 GPUs. The Linux multi-GPU runners are where they should run, and there they skip for a different reason:
| Runner | Skip reason |
|---|---|
| linux-64 T4 x2 (PR) | "Driver accepted GPU rotation/swap but migration is a no-op on this hardware/driver version" |
| linux-64 H100 x2 (PR) | same |
| linux-aarch64 L4 x2 (nightly, two rows) | same |
The scenario runs in a subprocess (_run_checkpoint_scenario_or_skip). It checkpoints a target process, restores it with a GPU UUID mapping, then compares the target's context device UUID (_target_uuid) before and after. On every multi-GPU runner, the restore succeeds but the observed UUID doesn't change, and the test turns that into a skip.
Investigation
Determine which of these holds:
- GPU migration on restore needs a newer driver than these runners have (Linux
latestis 595.99.02 / CUDA 13.2; see CI: no runner has a driver as new as the CTK under test (13.5) #3579), or host support that containerized runners lack. - Migration happens, but
_target_uuiddoesn't observe it, for example because it reads a cached or ordinal-based identity rather than the physical device behind the context. - The mapping the test builds (
gpu_mapping, keyed by UUID) isn't in the form the driver expects.
Then replace the catch-all skip with a precise condition: a driver-version gate if migration needs a newer driver, or a fix to the observation if the test is wrong.
Done when
The cause is known, and the two tests either pass on the Linux multi-GPU runners or skip only on a precise, documented condition.
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