Skip to content

samples: fix unsatisfiable dependency pins and depend on cuda-core[cu13] - #3601

Open
mdboom wants to merge 3 commits into
NVIDIA:mainfrom
mdboom:issue3567
Open

mdboom wants to merge 3 commits into
NVIDIA:mainfrom
mdboom:issue3567

Conversation

@mdboom

@mdboom mdboom commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Closes #3567. Part of #2077.

Summary

1. Three unsatisfiable sample pins

Each pin had a documented reason (in the sample's requirements.txt or README), so each fix addresses that reason rather than just deleting the pin:

Sample Before After Why
processCheckpoint cuda-python>=13.0.0,<13.3.0 cuda-core[cu13]>=1.3.0 Only cuda-bindings 13.3.0 lacked CUcheckpointRestoreArgs, and 13.3.1 restored it (#2144). cuda-core 1.3.0's cu13 extra requires cuda-bindings >=13.5.0, which excludes 13.3.0.
tmaTensorMap nvidia-cuda-cccl-cu12 nvidia-cuda-cccl>=13.0.0 The sample is CUDA 13 (cupy-cuda13x), and the CUDA 13 CCCL wheel has no -cu12 suffix. cuda.pathfinder finds its headers in nvidia/cu13/include/cccl.
pageRank cuda-core<1.0.0 cuda-core[cu13]>=1.0.0 The cap came from cudf-cu13 requiring numba-cuda<0.29.0. cudf-cu13 26.10.2 allows numba-cuda 0.30.4, which allows cuda-core<2.0.0. The README's known-issue note is removed.

processCheckpoint now runs in the regular core CI job on Linux CUDA 13 rows, so it is removed from the "not currently run in any CI job" marker in test_samples.py. tmaTensorMap still needs the CCCL wheel and CuPy installed, and pageRank still needs RAPIDS. #3578 tracks both.

2. cuda-core[cu13] instead of cuda-python

Samples that depend on cuda-core no longer list cuda-python. Plain cuda-core installs no cuda-bindings; they come only through its cu12/cu13 extras. So these samples now require cuda-core[cu13].

  • 43 PEP 723 headers, 43 requirements.txt files, and 34 READMEs.
  • glInteropFluid, glInteropMipmapLod and textureSample require >=1.1.0, because cuda.core.texture first shipped in cuda-core 1.1.0. The two GL headers had listed cuda_bindings plus cuda_core>0.6.0; they now match their requirements.txt.

3. Sample runner: check what an extra requires

cuda-python>=13.0.0 was what made these samples skip on CUDA 12 rows. The runner used to check only that a distribution declares a requested extra, so cuda-core[cu13] alone would have passed there too.

 missing_dependencies(sample)
   for each requirement:
     version satisfies specifier?
     requested extras declared?
+    for each requested extra:
+      for each requirement that extra adds (recursively, e.g. cu13 -> minimal-sysctk13):
+        installed?  -> its version must satisfy the requirement
+        not installed -> accepted (conda / a local CTK provide it without pip metadata)

So cuda-core[cu13] is unmet when cuda-bindings 12.x is installed:

cuda-core[cu13]>=1.0.0 (cuda-core 1.3.1: extra cu13 requires cuda-core[minimal-sysctk13]
  (cuda-core 1.3.1: extra minimal-sysctk13 requires cuda-bindings<14,>=13.5.0
    (cuda-bindings 12.9.6: version 12.9.6 does not satisfy <14,>=13.5.0)))

4. One copy of the sample test logic

cuda_core/tests/example_tests/test_samples.py and cuda_bindings_13/tests/example_tests/test_samples.py each repeated the code that runs one sample and turns its result into a pass, skip, or fail. That code is now SampleSuite in cuda_python_test_helpers/sample_runner.py:

_SUITE = SampleSuite(DEFAULT_SAMPLES_DIR, SAMPLE_NAMESPACE, DEFAULT_CONFIG)

@pytest.mark.parametrize("sample_key", _SUITE.keys)
...
def test_sample(sample_key: str) -> None:
    _SUITE.check(sample_key)  # cuda.bindings passes fail_on_unmet_dependencies=True
  • The "unmet package requirement(s):" prefix is one constant (UNMET_DEPENDENCIES).
  • Wrapper re-exports in both run_samples.py files that nothing uses anymore are removed.
  • sample_runner.py now imports pytest.
  • The CUDA 12 bindings root has no sample tests, so it has no counterpart change.

Evidence

Gating against real package metadata. Each sample's skip decision, before and after, in three environments:

Environment Samples whose skip status changes
CUDA 12 metadata (cuda-core 1.3.1, cuda-bindings 12.9.6) none: every cuda-core[cu13] sample still skips, now through the extras check
PyPI CUDA 13 (cuda-core 1.3.1, cuda-bindings 13.5.0, CuPy, nvidia-cuda-cccl) processCheckpoint and tmaTensorMap: skip → run
Local CUDA 13 dev build none

Samples:

  • processCheckpoint PASSED on an RTX 5070 and an RTX A400.
  • tmaTensorMap PASSED through the sample runner in the PyPI CUDA 13 environment, with CUDA_HOME/CUDA_PATH unset, using only the nvidia-cuda-cccl wheel's headers.
  • pageRank: uv pip compile resolves cuda-core>=1.0.0 together with cugraph-cu13, cudf-cu13 26.10.2, and dask-cuda (to cuda-core 1.2.2 and numba-cuda 0.30.4).
  • cuda_core/tests/example_tests: 121 passed, 39 skipped. cuda_bindings_13/tests/example_tests: 24 passed, 1 skipped (sample-reported waiver).

Confirming it runs in CI: in this PR's CI run, the Linux CUDA 13 core jobs should report test_sample[cuda_core/processCheckpoint] PASSED, where main reports it SKIPPED. The CUDA 12 jobs should still skip the cuda-core[cu13] samples, now with the extra cu13 requires … reason. For example:

gh run view <CI run id> --repo NVIDIA/cuda-python --log | grep -F "test_sample[cuda_core/processCheckpoint]"

Merge Danger

Door: two-way. Sample metadata and test harness only.

Blast Radius: sample tests in cuda.core and cuda.bindings, and anyone installing a sample's requirements.

  • processCheckpoint now runs on Linux CUDA 13 CI rows. It checkpoints and restores its own process, so a driver or container restriction on a runner would show up as a failure there.
  • Installing a cuda.core sample's requirements now installs cuda-core[cu13] (cuda-bindings 13.x plus cuda-toolkit 13 wheels) instead of cuda-python.
  • The extras check accepts a missing distribution, so it cannot newly skip samples in conda or local-toolkit environments. An installed distribution with a conflicting version now causes a skip.
  • test: fix find_skipped_tests.py parsing and remove stale CI markers #3590 also edits the test_samples.py marker list, so whichever merges second needs a small rebase.

Reviewers: please feel free to push commits directly to this PR to improve it.

🤖 Generated with Claude Code

Three cuda.core samples declared PEP 723 requirements that no CI
environment can satisfy, so they skipped everywhere:

- processCheckpoint capped cuda-python <13.3.0 because cuda-bindings
  13.3.0 lacked CUcheckpointRestoreArgs (13.3.1 restored it). Require
  cuda-core[cu13]>=1.3.0 instead: its cu13 extra needs cuda-bindings
  >=13.5.0, which excludes 13.3.0.
- tmaTensorMap required the CUDA 12 nvidia-cuda-cccl-cu12 package. Use
  the CUDA 13 nvidia-cuda-cccl>=13.0.0.
- pageRank pinned cuda-core<1.0.0 because cudf-cu13 used to require
  numba-cuda<0.29.0. Current cudf-cu13 allows numba-cuda 0.30.4, which
  allows cuda-core<2.0.0, so use a lower bound and drop the README note.

Samples that depend on cuda-core no longer list cuda-python. They
require cuda-core[cu13] instead, which installs the matching
cuda-bindings, in the PEP 723 headers, requirements.txt files, and
READMEs. Samples that use cuda.core.texture require cuda-core>=1.1.0.

The sample runner now checks the installed distributions that a
requested extra requires, so cuda-core[cu13] is unmet when cuda-bindings
12.x is installed and these samples keep skipping on CUDA 12 rows.
Distributions an extra requires but that are not installed are accepted,
because conda and a local CUDA Toolkit provide them without pip metadata.

Move the code that runs one sample and maps its result to a pytest
outcome, duplicated in the cuda.core and cuda.bindings test_samples.py,
into SampleSuite in sample_runner.py, and drop wrapper re-exports that
are no longer used.

processCheckpoint now runs in CI, so remove it from the "not currently
run in any CI job" marker scope.

Closes NVIDIA#3567.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdboom mdboom added this to the cuda.core 1.4.0 milestone Nov 25, 2026
@mdboom mdboom added test Improvements or additions to tests cuda.core Everything related to the cuda.core module labels Nov 25, 2026
@mdboom mdboom self-assigned this Nov 25, 2026
@github-actions github-actions Bot added the cuda.bindings Everything related to the cuda.bindings module label Nov 25, 2026
@mdboom
mdboom requested review from danielfrg and a balanced review from Copilot November 25, 2026 18:54
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated CUDA Core sample requirements and installation instructions to use the CUDA 13 extra instead of listing separate CUDA package requirements.
    • Updated minimum CUDA Core versions and dependency constraints where needed.
  • Bug Fixes
    • Improved sample dependency checks to validate requested extras and their conditional requirements, including version constraints and cycles.
    • Standardized sample test handling for missing dependencies and sample outcomes.

CUDA Core samples now declare CUDA 13 dependencies through cuda-core[cu13]. The runner validates requirements activated by requested extras and provides a shared SampleSuite interface for sample tests. The processCheckpoint test key is no longer included in the documented exclusion list.

Changes: CUDA 13 sample dependency and test updates

Layer / File(s) Summary
Recursive dependency-extra checks
cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py, cuda_core/tests/example_tests/test_run_samples.py
The runner recursively checks installed providers against requirements from requested extras. Tests cover transitive version constraints, absent distributions, and cyclic requirements.
CUDA Core sample dependency declarations
samples/cuda_core/*/{README.md,*.py,requirements.txt}
Sample declarations select cuda-core[cu13]. processCheckpoint updates its minimum version and requirements comment; pageRank removes its upper-bound pin; tmaTensorMap uses the CUDA 13 CCCL package. Other CUDA Core samples also update their dependency declarations.
Shared sample test execution
cuda_bindings_13/tests/example_tests/*, cuda_core/tests/example_tests/*, cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py
SampleSuite collects samples and handles test outcomes. The CUDA 13 and CUDA Core tests delegate checks to it. The runner modules remove selected helper re-exports.

Assessment against linked issues

Objective Addressed Explanation
[3567] Make the processCheckpoint, tmaTensorMap, and pageRank dependency declarations satisfiable in CI. ✅

Out-of-scope changes

Code Change Explanation
Update dependency declarations and README requirements for other CUDA Core samples, for example binarySearch (samples/cuda_core/binarySearch/requirements.txt:2) Issue 3567 identifies only processCheckpoint, tmaTensorMap, and pageRank; it does not state requirements for these other samples.

Possibly related issues

  • NVIDIA/cuda-python#2961: Recursive checks for requirements declared by requested extras address the described dependency-validation gap.
  • NVIDIA/cuda-python#3578: The changes update dependency declarations and sample test handling, but do not add the optional packages tracked by this issue.
  • NVIDIA/cuda-python#2077: The documented sample-key list no longer includes cuda_core/processCheckpoint; it continues to omit tmaTensorMap and pageRank.

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Low · up to 55103

The dependency changes and the shared sample-test suite look sound. One open edge case in the extra-requirement check could cause a sample to be skipped when a compatible fallback package is installed. It is a small, bounded follow-up.

Security architecture risk: Minimal · up to 55103

The change updates sample installation and consolidates test execution. It preserves the existing distinction between skipped and failed tests and does not introduce a production endpoint or grant new privileges.

Security review details

Security Blast Radius

  • observed — The checkpoint sample that becomes eligible under the revised requirements targets its own PID inside the sample subprocess. The change does not add a path for callers to select another process as the checkpoint target.

Trust Boundaries and Controls

  • observed — Pytest still takes its sample keys from repository discovery and checks file existence before executing a sample. Execution still occurs with the test runner's inherited environment; moving the call into SampleSuite does not create a sandbox or change subprocess privileges.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 223178c and 5510365.

Files selected for processing: 1

  • cuda_core/tests/example_tests/test_samples.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 7 remain after this review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both standalone sample CLIs fail to import without undeclared pytest, even for --help, and the recursive extras gate lacks unit coverage for dependency traversal and compatibility checks.

2 open issues
What changed in this PR

This PR corrects sample dependency metadata for #3567 and supports the broader effort in #2077 to reduce samples that never run in CI.

Changes:

  • Replaces separate cuda-python and cuda-core requirements with cuda-core[cu13], aligning script headers, requirements, and documentation.
  • Fixes the checkpoint, CCCL, and PageRank constraints, and raises texture samples’ minimum cuda-core version to 1.1.
  • Adds recursive extra-dependency checks and shares pytest sample execution through SampleSuite.

No CUDA 12 counterparts were found for cuda_bindings_13/tests/example_tests/run_samples.py or cuda_bindings_13/tests/example_tests/test_samples.py; no matching changes are needed there. The supplied diffs do not modify marked synchronized blocks.

File Description
samples/​cuda_core/​vectorAdd/​vectorAdd.py Selects the CUDA 13 extra.
samples/​cuda_core/​vectorAdd/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​vectorAdd/​README.md Updates dependency documentation.
samples/​cuda_core/​tmaTensorMap/​tmaTensorMap.py Selects CUDA 13 core and CCCL packages.
samples/​cuda_core/​tmaTensorMap/​requirements.txt Corrects the CCCL package requirement.
samples/​cuda_core/​tmaTensorMap/​README.md Documents the core extra.
samples/​cuda_core/​threadBlockCluster/​threadBlockCluster.py Selects the CUDA 13 extra.
samples/​cuda_core/​threadBlockCluster/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​threadBlockCluster/​README.md Updates dependency documentation.
samples/​cuda_core/​textureSample/​textureSample.py Requires core 1.1 with CUDA 13.
samples/​cuda_core/​textureSample/​requirements.txt Aligns the texture API minimum.
samples/​cuda_core/​textureSample/​README.md Documents the texture API minimum.
samples/​cuda_core/​systemInfo/​systemInfo.py Selects the CUDA 13 extra.
samples/​cuda_core/​systemInfo/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​systemInfo/​README.md Updates package and driver guidance.
samples/​cuda_core/​stridedMemoryViewGpu/​stridedMemoryViewGpu.py Selects the CUDA 13 extra.
samples/​cuda_core/​stridedMemoryViewGpu/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​stridedMemoryViewGpu/​README.md Updates dependency documentation.
samples/​cuda_core/​stridedMemoryViewCpu/​stridedMemoryViewCpu.py Selects the CUDA 13 extra.
samples/​cuda_core/​stridedMemoryViewCpu/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​stridedMemoryViewCpu/​README.md Updates dependency documentation.
samples/​cuda_core/​stridedMemoryViewConstructors/​stridedMemoryViewConstructors.py Selects the CUDA 13 extra.
samples/​cuda_core/​stridedMemoryViewConstructors/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​stridedMemoryViewConstructors/​README.md Updates dependency documentation.
samples/​cuda_core/​streamingCopyComputeOverlap/​streamingCopyComputeOverlap.py Selects the CUDA 13 extra.
samples/​cuda_core/​streamingCopyComputeOverlap/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​streamingCopyComputeOverlap/​README.md Updates the package list.
samples/​cuda_core/​simpleZeroCopy/​simpleZeroCopy.py Selects the CUDA 13 extra.
samples/​cuda_core/​simpleZeroCopy/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​simpleZeroCopy/​README.md Updates package names and install command.
samples/​cuda_core/​simplePrint/​simplePrint.py Selects the CUDA 13 extra.
samples/​cuda_core/​simplePrint/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​simplePrint/​README.md Updates dependency documentation.
samples/​cuda_core/​simpleP2P/​simpleP2P.py Selects the CUDA 13 extra.
samples/​cuda_core/​simpleP2P/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​simpleP2P/​README.md Updates and quotes install requirements.
samples/​cuda_core/​simpleMultiGpu/​simpleMultiGpu.py Selects the CUDA 13 extra.
samples/​cuda_core/​simpleMultiGpu/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​simpleMultiGpu/​README.md Updates dependency documentation.
samples/​cuda_core/​reductionMultiBlockCG/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​reductionMultiBlockCG/​reductionMultiBlockCG.py Selects the CUDA 13 extra.
samples/​cuda_core/​reduction/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​reduction/​reduction.py Selects the CUDA 13 extra.
samples/​cuda_core/​processCheckpoint/​requirements.txt Requires core 1.3 to exclude broken bindings.
samples/​cuda_core/​processCheckpoint/​README.md Documents the new minimum.
samples/​cuda_core/​processCheckpoint/​processCheckpoint.py Replaces the restrictive checkpoint pin.
samples/​cuda_core/​prefixSum/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​prefixSum/​README.md Updates dependency documentation.
samples/​cuda_core/​prefixSum/​prefixSum.py Selects the CUDA 13 extra.
samples/​cuda_core/​persistentProgramCache/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​persistentProgramCache/​README.md Updates dependency documentation.
samples/​cuda_core/​persistentProgramCache/​persistentProgramCache.py Selects the CUDA 13 extra.
samples/​cuda_core/​parallelReduction/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​parallelReduction/​README.md Updates dependency documentation.
samples/​cuda_core/​parallelReduction/​parallelReduction.py Selects the CUDA 13 extra.
samples/​cuda_core/​parallelHistogram/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​parallelHistogram/​parallelHistogram.py Selects the CUDA 13 extra.
samples/​cuda_core/​pageRank/​requirements.txt Replaces the pre-1.0 core cap.
samples/​cuda_core/​pageRank/​README.md Removes the obsolete downgrade warning.
samples/​cuda_core/​pageRank/​pageRank.py Allows core 1.x with CUDA 13.
samples/​cuda_core/​numpyVsCupy/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​numpyVsCupy/​numpyVsCupy.py Selects the CUDA 13 extra.
samples/​cuda_core/​multiGPUGradientAverage/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​multiGPUGradientAverage/​multiGPUGradientAverage.py Selects the CUDA 13 extra.
samples/​cuda_core/​memoryResources/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​memoryResources/​README.md Updates dependency documentation.
samples/​cuda_core/​memoryResources/​memoryResources.py Selects the CUDA 13 extra.
samples/​cuda_core/​matrixMulSharedMem/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​matrixMulSharedMem/​matrixMulSharedMem.py Selects the CUDA 13 extra.
samples/​cuda_core/​launchConfigTuning/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​launchConfigTuning/​launchConfigTuning.py Selects the CUDA 13 extra.
samples/​cuda_core/​kernelNsysProfile/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​kernelNsysProfile/​README.md Updates the package list.
samples/​cuda_core/​kernelNsysProfile/​kernelNsysProfile.py Selects the CUDA 13 extra.
samples/​cuda_core/​jitLtoLinking/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​jitLtoLinking/​README.md Updates dependency documentation.
samples/​cuda_core/​jitLtoLinking/​jitLtoLinking.py Selects the CUDA 13 extra.
samples/​cuda_core/​ipcMemoryPool/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​ipcMemoryPool/​README.md Updates dependency documentation.
samples/​cuda_core/​ipcMemoryPool/​ipcMemoryPool.py Selects the CUDA 13 extra.
samples/​cuda_core/​greenContext/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​greenContext/​README.md Documents the CUDA 13 extra.
samples/​cuda_core/​greenContext/​greenContext.py Selects the CUDA 13 extra.
samples/​cuda_core/​glInteropPlasma/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​glInteropPlasma/​README.md Updates dependency documentation.
samples/​cuda_core/​glInteropPlasma/​glInteropPlasma.py Selects the CUDA 13 extra.
samples/​cuda_core/​glInteropMipmapLod/​requirements.txt Requires core 1.1 with CUDA 13.
samples/​cuda_core/​glInteropMipmapLod/​README.md Documents the texture API minimum.
samples/​cuda_core/​glInteropMipmapLod/​glInteropMipmapLod.py Aligns core, NumPy, and pyglet requirements.
samples/​cuda_core/​glInteropFluid/​requirements.txt Requires core 1.1 with CUDA 13.
samples/​cuda_core/​glInteropFluid/​README.md Documents the texture API minimum.
samples/​cuda_core/​glInteropFluid/​glInteropFluid.py Aligns core, NumPy, and pyglet requirements.
samples/​cuda_core/​fftSignalAnalysis/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​fftSignalAnalysis/​fftSignalAnalysis.py Selects the CUDA 13 extra.
samples/​cuda_core/​deviceQuery/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​deviceQuery/​README.md Updates dependency documentation.
samples/​cuda_core/​deviceQuery/​deviceQuery.py Selects the CUDA 13 extra.
samples/​cuda_core/​customTensorFlowKernel/​requirements.txt Updates dependencies and package-role comment.
samples/​cuda_core/​customTensorFlowKernel/​README.md Documents the CUDA 13 extra.
samples/​cuda_core/​customTensorFlowKernel/​customTensorFlowKernel.py Selects the CUDA 13 extra.
samples/​cuda_core/​customPyTorchKernel/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​customPyTorchKernel/​README.md Documents the CUDA 13 extra.
samples/​cuda_core/​customPyTorchKernel/​customPyTorchKernel.py Selects the CUDA 13 extra.
samples/​cuda_core/​cudaGraphs/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​cudaGraphs/​README.md Updates dependency documentation.
samples/​cuda_core/​cudaGraphs/​cudaGraphs.py Selects the CUDA 13 extra.
samples/​cuda_core/​cudaComputeLambdas/​requirements.txt Adds the core CUDA 13 extra.
samples/​cuda_core/​cudaComputeLambdas/​README.md Documents the core extra.
samples/​cuda_core/​cudaComputeLambdas/​cudaComputeLambdas.py Adds explicit core CUDA 13 selection.
samples/​cuda_core/​copyImageArraytoGPU/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​copyImageArraytoGPU/​README.md Updates dependency documentation.
samples/​cuda_core/​copyImageArraytoGPU/​copyImageArraytoGPU.py Selects the CUDA 13 extra.
samples/​cuda_core/​blurImageUnifiedMemory/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​blurImageUnifiedMemory/​README.md Updates dependency documentation.
samples/​cuda_core/​blurImageUnifiedMemory/​blurImageUnifiedMemory.py Selects the CUDA 13 extra.
samples/​cuda_core/​blockwiseSum/​requirements.txt Aligns installation dependencies.
samples/​cuda_core/​blockwiseSum/​blockwiseSum.py Selects the CUDA 13 extra.
samples/​cuda_core/​binarySearch/​requirements.txt Adds the core CUDA 13 extra.
samples/​cuda_core/​binarySearch/​README.md Documents the core extra.
samples/​cuda_core/​binarySearch/​binarySearch.py Adds explicit core CUDA 13 selection.
cuda_python_test_helpers/​cuda_python_test_helpers/​sample_runner.py Adds recursive extras checks and SampleSuite.
cuda_core/​tests/​example_tests/​test_samples.py Uses SampleSuite; removes checkpoint’s never-run annotation.
cuda_core/​tests/​example_tests/​test_run_samples.py Adds requires to fake distribution metadata.
cuda_core/​tests/​example_tests/​run_samples.py Removes unused runner re-exports.
cuda_bindings_13/​tests/​example_tests/​test_samples.py Uses SampleSuite with strict dependency failures.
cuda_bindings_13/​tests/​example_tests/​run_samples.py Removes unused runner re-exports.

Review effort: Balanced

from pathlib import Path
from typing import Any

import pytest
Comment on lines +397 to +398
for extra in sorted(requested_extras - missing_extras):
mismatches.extend(_extra_mismatches(canonicalize_name(name), dist, extra, seen))

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c29b214 and d3c62b1.

Files selected for processing: 126

  • cuda_bindings_13/tests/example_tests/run_samples.py
  • cuda_bindings_13/tests/example_tests/test_samples.py
  • cuda_core/tests/example_tests/run_samples.py
  • cuda_core/tests/example_tests/test_run_samples.py
  • cuda_core/tests/example_tests/test_samples.py
  • cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py
  • samples/cuda_core/binarySearch/README.md
  • samples/cuda_core/binarySearch/binarySearch.py
  • samples/cuda_core/binarySearch/requirements.txt
  • samples/cuda_core/blockwiseSum/blockwiseSum.py
  • samples/cuda_core/blockwiseSum/requirements.txt
  • samples/cuda_core/blurImageUnifiedMemory/README.md
  • samples/cuda_core/blurImageUnifiedMemory/blurImageUnifiedMemory.py
  • samples/cuda_core/blurImageUnifiedMemory/requirements.txt
  • samples/cuda_core/copyImageArraytoGPU/README.md
  • samples/cuda_core/copyImageArraytoGPU/copyImageArraytoGPU.py
  • samples/cuda_core/copyImageArraytoGPU/requirements.txt
  • samples/cuda_core/cudaComputeLambdas/README.md
  • samples/cuda_core/cudaComputeLambdas/cudaComputeLambdas.py
  • samples/cuda_core/cudaComputeLambdas/requirements.txt
  • samples/cuda_core/cudaGraphs/README.md
  • samples/cuda_core/cudaGraphs/cudaGraphs.py
  • samples/cuda_core/cudaGraphs/requirements.txt
  • samples/cuda_core/customPyTorchKernel/README.md
  • samples/cuda_core/customPyTorchKernel/customPyTorchKernel.py
  • samples/cuda_core/customPyTorchKernel/requirements.txt
  • samples/cuda_core/customTensorFlowKernel/README.md
  • samples/cuda_core/customTensorFlowKernel/customTensorFlowKernel.py
  • samples/cuda_core/customTensorFlowKernel/requirements.txt
  • samples/cuda_core/deviceQuery/README.md
  • samples/cuda_core/deviceQuery/deviceQuery.py
  • samples/cuda_core/deviceQuery/requirements.txt
  • samples/cuda_core/fftSignalAnalysis/fftSignalAnalysis.py
  • samples/cuda_core/fftSignalAnalysis/requirements.txt
  • samples/cuda_core/glInteropFluid/README.md
  • samples/cuda_core/glInteropFluid/glInteropFluid.py
  • samples/cuda_core/glInteropFluid/requirements.txt
  • samples/cuda_core/glInteropMipmapLod/README.md
  • samples/cuda_core/glInteropMipmapLod/glInteropMipmapLod.py
  • samples/cuda_core/glInteropMipmapLod/requirements.txt
  • samples/cuda_core/glInteropPlasma/README.md
  • samples/cuda_core/glInteropPlasma/glInteropPlasma.py
  • samples/cuda_core/glInteropPlasma/requirements.txt
  • samples/cuda_core/greenContext/README.md
  • samples/cuda_core/greenContext/greenContext.py
  • samples/cuda_core/greenContext/requirements.txt
  • samples/cuda_core/ipcMemoryPool/README.md
  • samples/cuda_core/ipcMemoryPool/ipcMemoryPool.py
  • samples/cuda_core/ipcMemoryPool/requirements.txt
  • samples/cuda_core/jitLtoLinking/README.md
  • samples/cuda_core/jitLtoLinking/jitLtoLinking.py
  • samples/cuda_core/jitLtoLinking/requirements.txt
  • samples/cuda_core/kernelNsysProfile/README.md
  • samples/cuda_core/kernelNsysProfile/kernelNsysProfile.py
  • samples/cuda_core/kernelNsysProfile/requirements.txt
  • samples/cuda_core/launchConfigTuning/launchConfigTuning.py
  • samples/cuda_core/launchConfigTuning/requirements.txt
  • samples/cuda_core/matrixMulSharedMem/matrixMulSharedMem.py
  • samples/cuda_core/matrixMulSharedMem/requirements.txt
  • samples/cuda_core/memoryResources/README.md
  • samples/cuda_core/memoryResources/memoryResources.py
  • samples/cuda_core/memoryResources/requirements.txt
  • samples/cuda_core/multiGPUGradientAverage/multiGPUGradientAverage.py
  • samples/cuda_core/multiGPUGradientAverage/requirements.txt
  • samples/cuda_core/numpyVsCupy/numpyVsCupy.py
  • samples/cuda_core/numpyVsCupy/requirements.txt
  • samples/cuda_core/pageRank/README.md
  • samples/cuda_core/pageRank/pageRank.py
  • samples/cuda_core/pageRank/requirements.txt
  • samples/cuda_core/parallelHistogram/parallelHistogram.py
  • samples/cuda_core/parallelHistogram/requirements.txt
  • samples/cuda_core/parallelReduction/README.md
  • samples/cuda_core/parallelReduction/parallelReduction.py
  • samples/cuda_core/parallelReduction/requirements.txt
  • samples/cuda_core/persistentProgramCache/README.md
  • samples/cuda_core/persistentProgramCache/persistentProgramCache.py
  • samples/cuda_core/persistentProgramCache/requirements.txt
  • samples/cuda_core/prefixSum/README.md
  • samples/cuda_core/prefixSum/prefixSum.py
  • samples/cuda_core/prefixSum/requirements.txt
  • samples/cuda_core/processCheckpoint/README.md
  • samples/cuda_core/processCheckpoint/processCheckpoint.py
  • samples/cuda_core/processCheckpoint/requirements.txt
  • samples/cuda_core/reduction/reduction.py
  • samples/cuda_core/reduction/requirements.txt
  • samples/cuda_core/reductionMultiBlockCG/reductionMultiBlockCG.py
  • samples/cuda_core/reductionMultiBlockCG/requirements.txt
  • samples/cuda_core/simpleMultiGpu/README.md
  • samples/cuda_core/simpleMultiGpu/requirements.txt
  • samples/cuda_core/simpleMultiGpu/simpleMultiGpu.py
  • samples/cuda_core/simpleP2P/README.md
  • samples/cuda_core/simpleP2P/requirements.txt
  • samples/cuda_core/simpleP2P/simpleP2P.py
  • samples/cuda_core/simplePrint/README.md
  • samples/cuda_core/simplePrint/requirements.txt
  • samples/cuda_core/simplePrint/simplePrint.py
  • samples/cuda_core/simpleZeroCopy/README.md
  • samples/cuda_core/simpleZeroCopy/requirements.txt
  • samples/cuda_core/simpleZeroCopy/simpleZeroCopy.py
  • samples/cuda_core/streamingCopyComputeOverlap/README.md
  • samples/cuda_core/streamingCopyComputeOverlap/requirements.txt
  • samples/cuda_core/streamingCopyComputeOverlap/streamingCopyComputeOverlap.py
  • samples/cuda_core/stridedMemoryViewConstructors/README.md
  • samples/cuda_core/stridedMemoryViewConstructors/requirements.txt
  • samples/cuda_core/stridedMemoryViewConstructors/stridedMemoryViewConstructors.py
  • samples/cuda_core/stridedMemoryViewCpu/README.md
  • samples/cuda_core/stridedMemoryViewCpu/requirements.txt
  • samples/cuda_core/stridedMemoryViewCpu/stridedMemoryViewCpu.py
  • samples/cuda_core/stridedMemoryViewGpu/README.md
  • samples/cuda_core/stridedMemoryViewGpu/requirements.txt
  • samples/cuda_core/stridedMemoryViewGpu/stridedMemoryViewGpu.py
  • samples/cuda_core/systemInfo/README.md
  • samples/cuda_core/systemInfo/requirements.txt
  • samples/cuda_core/systemInfo/systemInfo.py
  • samples/cuda_core/textureSample/README.md
  • samples/cuda_core/textureSample/requirements.txt
  • samples/cuda_core/textureSample/textureSample.py
  • samples/cuda_core/threadBlockCluster/README.md
  • samples/cuda_core/threadBlockCluster/requirements.txt
  • samples/cuda_core/threadBlockCluster/threadBlockCluster.py
  • samples/cuda_core/tmaTensorMap/README.md
  • samples/cuda_core/tmaTensorMap/requirements.txt
  • samples/cuda_core/tmaTensorMap/tmaTensorMap.py
  • samples/cuda_core/vectorAdd/README.md
  • samples/cuda_core/vectorAdd/requirements.txt
  • samples/cuda_core/vectorAdd/vectorAdd.py
Files with no reviewable changes: 2

  • cuda_bindings_13/tests/example_tests/run_samples.py
  • samples/cuda_core/pageRank/README.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 5 remain after this review.

f"extra {extra} requires {_requirement_without_marker(requirement)} "
f"({provider} {provider_dist.version}: {detail})"
)
break

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

important: Check fallback providers before rejecting an extra requirement.

If an extra requires cupy-cuda13x>=14, installed metadata for cupy-cuda13x==13.0 causes this loop to stop even when the fallback cupy==14.0 satisfies the requirement. The top-level provider loop accepts that fallback, but the recursive loop incorrectly waives the sample.

Collect mismatches until all providers fail. Break only when a provider satisfies the requirement.

@github-actions

Copy link
Copy Markdown
Contributor

Import pytest inside SampleSuite.check so the standalone run_samples.py
CLIs work without pytest installed. Add unit tests covering transitive
extra checks (compatible/incompatible versions, accepted missing
distribution, and dependency cycles).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecture findings (1)

Advisory architecture findings (1)

  • Trivial — The new extra traversal parses installed Requires-Dist entries before filtering by marker. A malformed entry can raise an exception that bypasses the runner’s per-sample metadata error handler. A serial batch then stops before running later samples; in either serial or parallel mode, the batch can exit without its normal summary.
Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d3c62b1 and 223178c.

Files selected for processing: 2

  • cuda_core/tests/example_tests/test_run_samples.py
  • cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

# Conflicts:
#	cuda_core/tests/example_tests/test_samples.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

samples: fix PEP 723 dependency pins that no CI environment can satisfy (processCheckpoint, tmaTensorMap, pageRank)

2 participants