You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ab980a9
Browse filesBrowse the repository at this point in the historyBrowse files
cuda.core: declare the cuda-bindings floor once, in the pyproject extras (NVIDIA#2783)
The floor of each CUDA major was typed in three places: a table in
cuda/core/_bindings_floor.py, the cu12/cu13 extras in pyproject.toml, and
the support-policy table in the docs, kept in step by tests that only ran
in the GPU test jobs. The extras are now the single declaration, in the
form `cuda-bindings[all]>=<floor>,==<major>.*`, and everything derives
from them:
- _bindings_floor.py keeps the logic only: floors_from_extras() parses
the [project.optional-dependencies] table strictly (a malformed extra
fails instead of shifting the floor), plus the version helpers and the
import-time check, which now takes the build's recorded floor.
- build_hooks.py reads pyproject.toml (tomllib; tomli on 3.10, added to
build-system.requires) for the build-time check, the dynamic build
requirement and -DCUDA_CORE_MIN_CUDA_VERSION, and records the floor in
the generated _build_info.py, which cuda/core/__init__.py already reads.
__init__.py no longer hard-codes the supported majors.
- ci/tools/cuda_core_bindings_floor.py reads the floor out of the wheel's
_build_info.py (per major in the merged wheel) instead of the table.
- docs/source/conf.py defines |cuda-bindings-floor-cu12| and
|cuda-bindings-floor-cu13| from pyproject.toml; support.rst uses them
and labels the row with |release|. The stale cuda-bindings minimums in
api_nvml.rst are gone: cuda.core.system has no requirement beyond the
floor.
- toolshed/check_cuda_core_bindings_floor.py, a new pre-commit hook, checks
the two constraints that cannot be derived: ci/versions.yml must build
each major against a toolkit of the floor's major.minor, and no
documentation page (release notes excepted) may spell a floor out by
hand. tests/test_bindings_floor.py runs the same checks.
- AGENTS.md documents the coupling and a "Bumping the cuda-bindings floor"
checklist.
0 commit comments