Skip to content

cuda.bindings: rename CUDA 13 source root to cuda_bindings_13 - #3147

Open
rwgk wants to merge 1 commit into
rwgk/lychee-checkout-aware-linksfrom
rwgk/rename-cuda-bindings-13-source-root
Open

rwgk wants to merge 1 commit into
rwgk/lychee-checkout-aware-linksfrom
rwgk/rename-cuda-bindings-13-source-root

Conversation

@rwgk

@rwgk rwgk commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Following the discussion of #2737, the team requested a staged approach to supporting multiple CUDA bindings release lines on main (#1199). This PR is the first preparatory step: give the existing CUDA 13 source root an explicit versioned name and update the plumbing that depends on it.

This PR renames the CUDA 13 bindings source directory from cuda_bindings/ to cuda_bindings_13/, and updates the build, test, CI, documentation, and tooling paths that refer to it.

Package names, Python imports, generated bindings, and the sample and benchmark directory names stay the same. The shared build-helper symlink is retargeted to the new directory, and release documentation retains support for locating the source root in older tags.

Stacked on #3143 so Lychee can check repository links to the renamed directory before it exists on the default branch. This is a new iteration of #3116, which remains unchanged for reference.

Review aid

Most of the diff consists of the directory move and repeated path substitutions. A two-commit review branch makes the other adjustments easier to inspect. Read these two views in order:

  1. Changes with mechanical text substitutions removed. Compares against the base branch (PR #3143) after replacing cuda_bindings_13 with cuda_bindings in file contents; all file paths stay as in this PR.
  2. Mechanical text substitutions only. Shows the literal source-root substitutions that restore this PR's exact final tree.

Directory moves remain visible in the first view. The intermediate commit is for review only and is not expected to build. The review branch's final tree was verified to match this PR's head exactly.

This review comment explains the changes in ci/tools/tests/test_build_docs_for_link_check.py, including why the test now executes the helper's import checks.

Validation

  • Independently reconstructed the rename on the same base and reconciled both implementations to an identical Git tree.
  • Fresh CUDA 13.4 TestVenv builds and QA suites: passed (Pathfinder, bindings in both default-stream modes, Core, and both Cython suites).
  • CI-tool tests: 292 passed, plus 36 subtests.
  • pre-commit run --all-files: passed.
  • Full CI: passed. One Windows job was retried after a results-upload timeout; its tests had passed.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Move the current bindings sources and update build, CI, documentation, and tooling paths. Preserve distribution and import names, samples, historical links, and the shared build-helper symlink.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@rwgk rwgk added this to the cuda.bindings next milestone Oct 18, 2026
@rwgk rwgk added the enhancement Any code-related improvements label Oct 18, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk rwgk self-assigned this Oct 18, 2026
@github-actions github-actions Bot added CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module labels Oct 18, 2026
@rwgk
rwgk added this pull request to stack #3144 October 18, 2026 18:04
@rwgk

rwgk commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test ba4ebf1

@github-actions

Copy link
Copy Markdown
Contributor

@@ -23,8 +23,26 @@ def test_checking_build_uses_final_local_output_as_docs_domain(tmp_path, monkeyp
helper.parent.mkdir(parents=True)
shutil.copyfile(BUILD_HELPER, helper)

@rwgk rwgk Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

codex GPT-6.1-Sol ultra explanation for the changes in this file:

These changes make the existing docs-helper test exercise the source-directory mapping affected by this PR.

The helper checks that cuda.bindings, cuda.core, and cuda.pathfinder are imported from this checkout and that their versions agree with installed distribution metadata. Previously, it inferred each source directory from the distribution name by replacing hyphens with underscores. That inference stops working for bindings after this rename:

Distribution:     cuda-bindings
Python import:    cuda.bindings
Source directory: cuda_bindings_13

The helper now records the source directories explicitly. To cover that change, this test needs to execute the helper's import checks.

Previously, the test's fake python executable intercepted python - (execute a program from standard input), discarded the program with cat >/dev/null, and returned success. That bypassed the entire import-checking block. Leaving that stub in place would let the test pass even if the helper still expected the old cuda_bindings/ directory.

The added setup creates minimal Python packages under the expected source directories, supplies matching .dist-info/METADATA, and exposes those directories through PYTHONPATH. Removing the python - interception then lets the real interpreter execute the helper's checks against this temporary checkout.

Package installation remains stubbed out, and documentation generation remains simulated, so the test still runs without CUDA or Sphinx. Its existing assertions about the docs domain and copied output remain in place; it now also fails if the helper uses the wrong source directory.

@rwgk
rwgk marked this pull request as ready for review October 18, 2026 23:33
@rwgk rwgk added the PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together. label Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

This pull request changes a CodeRabbit configuration file. Because it comes from a fork or its author is not a repository collaborator, reviews use only the configuration from the target branch. The proposed configuration will take effect after it is merged.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated project workflows, documentation, and development tooling to recognize the CUDA bindings package under its versioned name.
    • Preserved support for other packages and existing build and test behavior.

References to the CUDA bindings source directory now use cuda_bindings_13 across package integration, build and test workflows, CI tooling, and repository configuration. The documentation workflow prefers this directory and falls back to cuda_bindings.

Changes: Bindings source-path update

Layer / File(s) Summary
Package paths and shared build integration
cuda_bindings_13/*, cuda_core/*, cuda_python/*, cuda_python_test_helpers/*
Package documentation, shared build paths, local dependencies, and source-based tests now reference cuda_bindings_13.
Build and test workflows
.github/workflows/*, pixi.toml, pytest.ini
Documentation, wheel, source-distribution, coverage, and source-test workflows use the versioned directory. The docs workflow prefers cuda_bindings_13, falls back to cuda_bindings, and fails if neither exists.
CI planning and validation tooling
ci/tools/*, ci/README.md
CI scripts and test fixtures use cuda_bindings_13 paths. PACKAGE_MODULES now defines four package-to-module mappings explicitly.
Repository configuration and path references
.coderabbit.yaml, .github/labeler.yml, .gitignore, .pre-commit-config.yaml, AGENTS.md, CONTRIBUTING.md, README.md, benchmarks/*, context7.json, ruff.toml, toolshed/*
Guidance, filters, ignore patterns, lint rules, and development tooling point to cuda_bindings_13.

Suggested reviewers: mdboom, juenglin, andy-jost

Priority: ⬇️ Low

Change: Refactor

Merge Risk: 🔵 Low · up to ba4eb

Update the two lockfiles and preserve generated-file seal checks across the rename. The identified gaps are bounded, but should be addressed before merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@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: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 39093a49-fecc-4a59-8b55-d92ef1a9cb2b
📥 Commits

Reviewing files that changed from the base of the PR and between 983ac75 and ba4ebf1.

⛔ Files ignored due to path filters: 4
  • benchmarks/cuda_bindings/pixi.lock is excluded by !**/*.lock
  • cuda_bindings_13/docs/source/_static/images/Nsight-Compute-CLI-625x473.png is excluded by !**/*.png
  • cuda_bindings_13/pixi.lock is excluded by !**/*.lock
  • cuda_core/pixi.lock is excluded by !**/*.lock
📒 Files selected for processing: 285
  • .coderabbit.yaml
  • .github/labeler.yml
  • .github/workflows/build-docs.yml
  • .github/workflows/build-wheel.yml
  • .github/workflows/ci-pixi-source-test.yml
  • .github/workflows/ci.yml
  • .github/workflows/coverage.yml
  • .github/workflows/test-sdist-linux.yml
  • .github/workflows/test-sdist-windows.yml
  • .gitignore
  • .pre-commit-config.yaml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • benchmarks/cuda_bindings/AGENTS.md
  • benchmarks/cuda_bindings/pixi.toml
  • benchmarks/cuda_core/pixi.toml
  • ci/README.md
  • ci/tools/build_docs_for_link_check.sh
  • ci/tools/check_pixi_cuda_version.py
  • ci/tools/check_release_notes.py
  • ci/tools/compute_ci_plan.py
  • ci/tools/env-vars
  • ci/tools/run-tests
  • ci/tools/tests/test_build_docs_for_link_check.py
  • ci/tools/tests/test_check_release_notes.py
  • ci/tools/tests/test_compute_ci_plan.py
  • context7.json
  • cuda_bindings_13/.git_archival.txt
  • cuda_bindings_13/AGENTS.md
  • cuda_bindings_13/CLAUDE.md
  • cuda_bindings_13/DESCRIPTION.rst
  • cuda_bindings_13/LICENSE
  • cuda_bindings_13/MANIFEST.in
  • cuda_bindings_13/README.md
  • cuda_bindings_13/_build_shared.py
  • cuda_bindings_13/build_hooks.py
  • cuda_bindings_13/cuda/bindings/__init__.pxd
  • cuda_bindings_13/cuda/bindings/__init__.py
  • cuda_bindings_13/cuda/bindings/_internal/__init__.py
  • cuda_bindings_13/cuda/bindings/_internal/_fast_enum.py
  • cuda_bindings_13/cuda/bindings/_internal/cudla.pxd
  • cuda_bindings_13/cuda/bindings/_internal/cudla_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/cudla_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/cufile.pxd
  • cuda_bindings_13/cuda/bindings/_internal/cufile_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/driver.pxd
  • cuda_bindings_13/cuda/bindings/_internal/driver_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/driver_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvfatbin.pxd
  • cuda_bindings_13/cuda/bindings/_internal/nvfatbin_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvfatbin_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvjitlink.pxd
  • cuda_bindings_13/cuda/bindings/_internal/nvjitlink_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvjitlink_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvml.pxd
  • cuda_bindings_13/cuda/bindings/_internal/nvml_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvml_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvrtc.pxd
  • cuda_bindings_13/cuda/bindings/_internal/nvrtc_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvrtc_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvvm.pxd
  • cuda_bindings_13/cuda/bindings/_internal/nvvm_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/nvvm_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/runtime.pxd
  • cuda_bindings_13/cuda/bindings/_internal/runtime_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/runtime_ptds.pxd
  • cuda_bindings_13/cuda/bindings/_internal/runtime_ptds_linux.pyx
  • cuda_bindings_13/cuda/bindings/_internal/runtime_ptds_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/runtime_windows.pyx
  • cuda_bindings_13/cuda/bindings/_internal/utils.pxd
  • cuda_bindings_13/cuda/bindings/_internal/utils.pyx
  • cuda_bindings_13/cuda/bindings/_lib/__init__.py
  • cuda_bindings_13/cuda/bindings/_lib/cyruntime/cyruntime.pxd
  • cuda_bindings_13/cuda/bindings/_lib/cyruntime/cyruntime.pxi
  • cuda_bindings_13/cuda/bindings/_lib/dlfcn.pxd
  • cuda_bindings_13/cuda/bindings/_lib/utils.pxd
  • cuda_bindings_13/cuda/bindings/_lib/utils.pxi
  • cuda_bindings_13/cuda/bindings/_lib/windll.pxd
  • cuda_bindings_13/cuda/bindings/_v2/__init__.py
  • cuda_bindings_13/cuda/bindings/_v2/nvrtc.pxd
  • cuda_bindings_13/cuda/bindings/_v2/nvrtc.pyx
  • cuda_bindings_13/cuda/bindings/cudla.pxd
  • cuda_bindings_13/cuda/bindings/cudla.pyx
  • cuda_bindings_13/cuda/bindings/cufile.pxd
  • cuda_bindings_13/cuda/bindings/cufile.pyx
  • cuda_bindings_13/cuda/bindings/cycudla.pxd
  • cuda_bindings_13/cuda/bindings/cycudla.pyx
  • cuda_bindings_13/cuda/bindings/cycufile.pxd
  • cuda_bindings_13/cuda/bindings/cycufile.pyx
  • cuda_bindings_13/cuda/bindings/cydriver.pxd
  • cuda_bindings_13/cuda/bindings/cydriver.pyx
  • cuda_bindings_13/cuda/bindings/cynvfatbin.pxd
  • cuda_bindings_13/cuda/bindings/cynvfatbin.pyx
  • cuda_bindings_13/cuda/bindings/cynvjitlink.pxd
  • cuda_bindings_13/cuda/bindings/cynvjitlink.pyx
  • cuda_bindings_13/cuda/bindings/cynvml.pxd
  • cuda_bindings_13/cuda/bindings/cynvml.pyx
  • cuda_bindings_13/cuda/bindings/cynvrtc.pxd
  • cuda_bindings_13/cuda/bindings/cynvrtc.pyx
  • cuda_bindings_13/cuda/bindings/cynvvm.pxd
  • cuda_bindings_13/cuda/bindings/cynvvm.pyx
  • cuda_bindings_13/cuda/bindings/cyruntime.pxd
  • cuda_bindings_13/cuda/bindings/cyruntime.pyx
  • cuda_bindings_13/cuda/bindings/driver.pxd
  • cuda_bindings_13/cuda/bindings/driver.pyx
  • cuda_bindings_13/cuda/bindings/nvfatbin.pxd
  • cuda_bindings_13/cuda/bindings/nvfatbin.pyx
  • cuda_bindings_13/cuda/bindings/nvjitlink.pxd
  • cuda_bindings_13/cuda/bindings/nvjitlink.pyx
  • cuda_bindings_13/cuda/bindings/nvml.pxd
  • cuda_bindings_13/cuda/bindings/nvml.pyx
  • cuda_bindings_13/cuda/bindings/nvrtc.pxd
  • cuda_bindings_13/cuda/bindings/nvrtc.pyx
  • cuda_bindings_13/cuda/bindings/nvvm.pxd
  • cuda_bindings_13/cuda/bindings/nvvm.pyx
  • cuda_bindings_13/cuda/bindings/runtime.pxd
  • cuda_bindings_13/cuda/bindings/runtime.pyx
  • cuda_bindings_13/cuda/bindings/utils/__init__.py
  • cuda_bindings_13/cuda/bindings/utils/_envvar.py
  • cuda_bindings_13/cuda/bindings/utils/_nvvm_utils.py
  • cuda_bindings_13/cuda/bindings/utils/_ptx_utils.py
  • cuda_bindings_13/cuda/bindings/utils/_version_check.py
  • cuda_bindings_13/docs/Makefile
  • cuda_bindings_13/docs/README.md
  • cuda_bindings_13/docs/build_docs.sh
  • cuda_bindings_13/docs/make.bat
  • cuda_bindings_13/docs/nv-versions.json
  • cuda_bindings_13/docs/source/_templates/main.html
  • cuda_bindings_13/docs/source/api.rst
  • cuda_bindings_13/docs/source/conduct.rst
  • cuda_bindings_13/docs/source/conf.py
  • cuda_bindings_13/docs/source/contribute.rst
  • cuda_bindings_13/docs/source/environment_variables.rst
  • cuda_bindings_13/docs/source/examples.rst
  • cuda_bindings_13/docs/source/index.rst
  • cuda_bindings_13/docs/source/install.rst
  • cuda_bindings_13/docs/source/license.rst
  • cuda_bindings_13/docs/source/module/cudla.rst
  • cuda_bindings_13/docs/source/module/cufile.rst
  • cuda_bindings_13/docs/source/module/driver.rst
  • cuda_bindings_13/docs/source/module/nvfatbin.rst
  • cuda_bindings_13/docs/source/module/nvjitlink.rst
  • cuda_bindings_13/docs/source/module/nvml.rst
  • cuda_bindings_13/docs/source/module/nvrtc.rst
  • cuda_bindings_13/docs/source/module/nvvm.rst
  • cuda_bindings_13/docs/source/module/runtime.rst
  • cuda_bindings_13/docs/source/module/utils.rst
  • cuda_bindings_13/docs/source/motivation.rst
  • cuda_bindings_13/docs/source/overview.rst
  • cuda_bindings_13/docs/source/release.rst
  • cuda_bindings_13/docs/source/release/11.4.0-notes.rst
  • cuda_bindings_13/docs/source/release/11.5.0-notes.rst
  • cuda_bindings_13/docs/source/release/11.6.0-notes.rst
  • cuda_bindings_13/docs/source/release/11.6.1-notes.rst
  • cuda_bindings_13/docs/source/release/11.7.0-notes.rst
  • cuda_bindings_13/docs/source/release/11.7.1-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.0-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.1-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.2-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.3-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.4-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.5-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.6-notes.rst
  • cuda_bindings_13/docs/source/release/11.8.7-notes.rst
  • cuda_bindings_13/docs/source/release/12.0.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.1.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.2.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.2.1-notes.rst
  • cuda_bindings_13/docs/source/release/12.3.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.4.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.5.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.6.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.6.1-notes.rst
  • cuda_bindings_13/docs/source/release/12.6.2-notes.rst
  • cuda_bindings_13/docs/source/release/12.8.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.0-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.1-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.2-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.3-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.4-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.5-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.6-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.7-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.8-notes.rst
  • cuda_bindings_13/docs/source/release/12.9.9-notes.rst
  • cuda_bindings_13/docs/source/release/13.0.0-notes.rst
  • cuda_bindings_13/docs/source/release/13.0.1-notes.rst
  • cuda_bindings_13/docs/source/release/13.0.2-notes.rst
  • cuda_bindings_13/docs/source/release/13.0.3-notes.rst
  • cuda_bindings_13/docs/source/release/13.1.0-notes.rst
  • cuda_bindings_13/docs/source/release/13.1.1-notes.rst
  • cuda_bindings_13/docs/source/release/13.2.0-notes.rst
  • cuda_bindings_13/docs/source/release/13.3.0-notes.rst
  • cuda_bindings_13/docs/source/release/13.3.1-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.0-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.0b1-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.1-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.1a0-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.2-notes.rst
  • cuda_bindings_13/docs/source/release/13.4.3-notes.rst
  • cuda_bindings_13/docs/source/release/13.5.0-notes.rst
  • cuda_bindings_13/docs/source/support.rst
  • cuda_bindings_13/docs/source/tips_and_tricks.rst
  • cuda_bindings_13/docs/versions.json
  • cuda_bindings_13/pixi.toml
  • cuda_bindings_13/pyproject.toml
  • cuda_bindings_13/setup.py
  • cuda_bindings_13/tests/conftest.py
  • cuda_bindings_13/tests/cudla/conftest.py
  • cuda_bindings_13/tests/cudla/test_cudla_bindings.py
  • cuda_bindings_13/tests/cufile.json
  • cuda_bindings_13/tests/cython/build_tests.bat
  • cuda_bindings_13/tests/cython/build_tests.py
  • cuda_bindings_13/tests/cython/build_tests.sh
  • cuda_bindings_13/tests/cython/test_ccuda.pyx
  • cuda_bindings_13/tests/cython/test_ccudart.pyx
  • cuda_bindings_13/tests/cython/test_cython.py
  • cuda_bindings_13/tests/cython/test_interoperability_cython.pyx
  • cuda_bindings_13/tests/example_tests/run_samples.py
  • cuda_bindings_13/tests/example_tests/test_args.json
  • cuda_bindings_13/tests/example_tests/test_cuda_bindings_utils.py
  • cuda_bindings_13/tests/example_tests/test_interactive_sample_configuration.py
  • cuda_bindings_13/tests/example_tests/test_samples.py
  • cuda_bindings_13/tests/legacy_api/README.md
  • cuda_bindings_13/tests/legacy_api/test_legacy_kernelParams.py
  • cuda_bindings_13/tests/legacy_api/test_legacy_nvfatbin.py
  • cuda_bindings_13/tests/legacy_api/test_legacy_nvjitlink.py
  • cuda_bindings_13/tests/legacy_api/test_legacy_nvrtc.py
  • cuda_bindings_13/tests/nvml/README.md
  • cuda_bindings_13/tests/nvml/__init__.py
  • cuda_bindings_13/tests/nvml/conftest.py
  • cuda_bindings_13/tests/nvml/test_compute_mode.py
  • cuda_bindings_13/tests/nvml/test_cuda.py
  • cuda_bindings_13/tests/nvml/test_device.py
  • cuda_bindings_13/tests/nvml/test_gpu.py
  • cuda_bindings_13/tests/nvml/test_init.py
  • cuda_bindings_13/tests/nvml/test_nvlink.py
  • cuda_bindings_13/tests/nvml/test_page_retirement.py
  • cuda_bindings_13/tests/nvml/test_pci.py
  • cuda_bindings_13/tests/nvml/test_pynvml.py
  • cuda_bindings_13/tests/nvml/test_unit.py
  • cuda_bindings_13/tests/nvml/test_util.py
  • cuda_bindings_13/tests/nvml/util.py
  • cuda_bindings_13/tests/test_basics.py
  • cuda_bindings_13/tests/test_build_hooks.py
  • cuda_bindings_13/tests/test_cuda.py
  • cuda_bindings_13/tests/test_cudart.py
  • cuda_bindings_13/tests/test_cufile.py
  • cuda_bindings_13/tests/test_envvar.py
  • cuda_bindings_13/tests/test_graphics_apis.py
  • cuda_bindings_13/tests/test_interoperability.py
  • cuda_bindings_13/tests/test_kernelParams.py
  • cuda_bindings_13/tests/test_nvfatbin.py
  • cuda_bindings_13/tests/test_nvjitlink.py
  • cuda_bindings_13/tests/test_nvrtc.py
  • cuda_bindings_13/tests/test_nvvm.py
  • cuda_bindings_13/tests/test_utils.py
  • cuda_bindings_13/tests/test_version_check.py
  • cuda_bindings_13/tests/utils/check_cyclical_import.py
  • cuda_core/AGENTS.md
  • cuda_core/_build_shared.py
  • cuda_core/build_hooks.py
  • cuda_core/pixi.toml
  • cuda_core/pyproject.toml
  • cuda_core/tests/AGENTS.md
  • cuda_core/tests/conftest.py
  • cuda_core/tests/example_tests/test_sample_environment.py
  • cuda_core/tests/test_build_hooks.py
  • cuda_core/tests/test_driver_table.py
  • cuda_core/tests/test_graphics.py
  • cuda_core/tests/test_rt_layout.py
  • cuda_python/AGENTS.md
  • cuda_python/docs/build_all_docs.sh
  • cuda_python_test_helpers/cuda_python_test_helpers/_pytest_plugin.py
  • cuda_python_test_helpers/cuda_python_test_helpers/cython_cache.py
  • cuda_python_test_helpers/cuda_python_test_helpers/graphics.py
  • pixi.toml
  • pytest.ini
  • ruff.toml
  • toolshed/build_static_bitcode_input.py
  • toolshed/check_cython_not_none.py
  • toolshed/check_generated_file_seals.py
  • toolshed/check_spdx.py
  • toolshed/find_skipped_tests.py

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


[feature.bindings-source.dependencies]
cuda-bindings = { path = "../../cuda_bindings" }
cuda-bindings = { path = "../../cuda_bindings_13" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

git diff --name-status 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- '*pixi.toml' '*pixi.lock'
rg -n -A19 '## Pixi lockfiles' CONTRIBUTING.md
git diff 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- pixi.toml benchmarks/cuda_bindings/pixi.toml

Repository: NVIDIA/cuda-python

Length of output: 3001


important: Update the root lockfile.

The root pixi.toml changed, so regenerate pixi.lock with the pinned Pixi version:

pixi lock --manifest-path .

The benchmark bindings lockfile is already updated. The CUDA core lockfile is a separate finding.

[feature.core-source.dependencies]
cuda-core = { path = "../../cuda_core" }
cuda-bindings = { path = "../../cuda_bindings" }
cuda-bindings = { path = "../../cuda_bindings_13" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n -C 5 'cuda_bindings|cuda-bindings' benchmarks/cuda_core/pixi.lock | head -100
sed -n '1,110p' benchmarks/cuda_core/pixi.toml
rg -n 'locked|frozen|pixi (install|run|lock)|benchmarks/cuda_core' .github ci benchmarks/cuda_core/README.md CONTRIBUTING.md | head -130

Repository: NVIDIA/cuda-python

Length of output: 12437


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- CONTRIBUTING lockfile guidance ---'
sed -n '240,282p' CONTRIBUTING.md
printf '%s\n' '--- lock freshness workflow ---'
sed -n '1,150p' .github/workflows/ci-pixi-lockfile-freshness-check.yml
printf '%s\n' '--- source test workflow relevant setup ---'
sed -n '55,125p' .github/workflows/ci-pixi-source-test.yml
printf '%s\n' '--- benchmark lock local/source references ---'
rg -n -C 4 -F -e 'cuda_bindings_13' -e 'cuda_bindings' -e 'cuda-bindings' -e 'source = ' benchmarks/cuda_core/pixi.lock || test "$?" -eq 1
printf '%s\n' '--- benchmark lock header and workspace metadata ---'
sed -n '1,35p' benchmarks/cuda_core/pixi.lock
printf '%s\n' '--- exact PR diff for benchmark files ---'
git diff --name-status 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- benchmarks/cuda_core

Repository: NVIDIA/cuda-python

Length of output: 12330


important: Update benchmarks/cuda_core/pixi.lock with this manifest change.

The source environment now points cuda-bindings to ../../cuda_bindings_13, but the lockfile is unchanged. Pixi may refresh a stale lock during pixi run, so this does not establish a benchmark environment failure. The repository still requires the matching lockfile update.

Regenerate it with the pinned Pixi version:

pixi lock --manifest-path benchmarks/cuda_core

"HEAD",
"--",
"cuda_bindings",
"cuda_bindings_13",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,160p' toolshed/check_generated_file_seals.py
sed -n '60,76p' .pre-commit-config.yaml
rg -n 'sealed|generated.file.seals|seal' AGENTS.md CONTRIBUTING.md cuda_bindings_13/AGENTS.md

Repository: NVIDIA/cuda-python

Length of output: 5893


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- focused diff ---'
git diff --find-renames 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- toolshed/check_generated_file_seals.py .pre-commit-config.yaml

printf '%s\n' '--- relevant references ---'
rg -n -F --glob '!**/.git/**' -e 'check-generated-file-seals' -e 'generated-file seal' -e 'GENERATED-DO-NOT-MODIFY-THIS-FILE' -e 'cuda_bindings/' -e 'cuda_bindings_13/' .pre-commit-config.yaml toolshed AGENTS.md CONTRIBUTING.md cuda_bindings_13 2>/dev/null || test "$?" -eq 1

printf '%s\n' '--- base and head sealed-file path samples ---'
git grep -l -I -F -- 'GENERATED-DO-NOT-MODIFY-THIS-FILE' 983ac757fea12a9f29575a82c4d5e269914784d8 -- cuda_bindings 2>/dev/null | sed -n '1,12p'
git grep -l -I -F -- 'GENERATED-DO-NOT-MODIFY-THIS-FILE' ba4ebf153f574e993ecf755c2946348c2c67ff50 -- cuda_bindings_13 2>/dev/null | sed -n '1,12p'

Repository: NVIDIA/cuda-python

Length of output: 23064


suggestion: Preserve seal checks across the rename.

When pre-commit runs before the rename is committed, HEAD can contain a sealed file under cuda_bindings/, while the hook checks its cuda_bindings_13/ path. Removing the seal can therefore pass the hook. Map the old path to the new path while loading previously sealed files.

Suggested fix
             "HEAD",
             "--",
+            "cuda_bindings",
             "cuda_bindings_13",
         ],
@@
-    return {
-        normalize_repo_path(line.removeprefix(head_prefix))
-        for line in process.stdout.splitlines()
-        if line.startswith(head_prefix)
-    }
+    previously_sealed_paths = set()
+    for line in process.stdout.splitlines():
+        if not line.startswith(head_prefix):
+            continue
+        path = normalize_repo_path(line.removeprefix(head_prefix))
+        if path.startswith("cuda_bindings/"):
+            path = "cuda_bindings_13/" + path.removeprefix("cuda_bindings/")
+        previously_sealed_paths.add(path)
+    return previously_sealed_paths
🧰 Tools
🪛 ast-grep (0.45.3)

[error] 54-69: Command coming from incoming request
Context: subprocess.run( # noqa: S603
[ # noqa: S607
"git",
"grep",
"-l",
"-I",
"-F",
"-e",
GENERATED_FILE_MARKER_FRAGMENT,
"HEAD",
"--",
"cuda_bindings_13",
],
capture_output=True,
text=True,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

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

CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module enhancement Any code-related improvements PR review get-together Mark PRs you'd like the team to review at the weekly PR review get-together.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant