Skip to content

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

Open
mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3567
Open

mdboom wants to merge 1 commit 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 →

Summary

Summary by CodeRabbit

  • Documentation
    • Updated CUDA Core sample requirements and installation instructions to use the CUDA 13 extra, replacing separate CUDA package requirements.
    • Updated affected samples to reflect the appropriate minimum CUDA Core versions and dependency constraints.
  • Bug Fixes
    • Improved sample dependency checks to account for requested extras and their transitive requirements, helping identify incompatible installed packages.
    • Standardized sample test handling for missing dependencies and sample outcomes.

The changes update CUDA Core sample dependency declarations, add recursive checks for requested package extras, and route sample tests through a shared pytest suite. The three sample dependency pins identified in issue 3567 are revised.

Changes: CUDA Core sample dependency and test flow

Layer / File(s) Summary
Recursive dependency-extra checks
cuda_python_test_helpers/cuda_python_test_helpers/sample_runner.py
The runner recursively checks installed providers against requested extras. It tracks visited distribution-extra pairs and uses a shared unmet-dependency message prefix.
CUDA Core sample dependency declarations
samples/cuda_core/*/{README.md,*.py,requirements.txt}
Sample declarations change to cuda-core[cu13]. The processCheckpoint and pageRank constraints are updated, and tmaTensorMap switches to the CUDA 13 CCCL package.
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 loads sample entries and configuration and handles test outcomes. The CUDA 13 and CUDA Core tests delegate checks to it; selected runner re-exports are removed.

Assessment against linked issues

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

Out-of-scope changes

Code Change Explanation
Update dependency declarations for other samples, such as binarySearch (samples/cuda_core/binarySearch/requirements.txt:2) Issue 3567 identifies only processCheckpoint, tmaTensorMap, and pageRank; it does not request changing other sample requirements.

Possibly related issues

  • Issue 2961: The recursive checks for requirements declared by requested extras address the described dependency-validation gap. The changes do not complete the issue’s cupy-cuda13x standardization.
  • Issue 3578: The PR changes sample dependency declarations and skip handling, but does not add the optional packages tracked by the issue.
  • Issue 3562: The CUDA Core sample test list no longer marks processCheckpoint as not currently run in CI. The PR does not address the test-discovery parsing issues described there.

Suggested reviewers: danielfrg, jpascucci-nv

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Low · up to d3c62

The recursive extra check can wrongly skip a sample when an alternate provider package, such as cupy instead of cupy-cuda13x, satisfies a requirement that the first installed provider fails. This affects only test gating, not production behavior. Fix the provider loop to continue past a mismatched provider before merging, or accept it as a minor follow-up.

Security architecture risk: Minimal · up to d3c62

The shared runner preserves each suite’s skip and failure rules and uses the same subprocess permissions as before. The dependency changes affect sample installation and test eligibility; the review found no material weakening of security or failure containment.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed execution path is scoped to sample-running environments. Dependency metadata can affect whether a sample launches, but the inspected change does not introduce a remote caller, a new launcher source, or greater process authority.

Trust Boundaries and Controls

  • observed — Samples continue to run as subprocesses with the runner’s inherited environment, the sample directory as the working directory, and the existing timeout. The subprocess separates execution from pytest but is not a credential sandbox; this behavior predates the PR.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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