Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cuda_core/docs/source/release/1.3.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Breaking Changes
----------------

- ``cuda.core`` now requires a minimum ``cuda-bindings`` version per CUDA major, at build and run
time: 12.9.8 for CUDA 12 and 13.4.1 for CUDA 13. See the
time: 12.9.8 for CUDA 12 and 13.5.0 for CUDA 13. See the
:ref:`support policy <cuda-core-bindings-floor>`. ``import cuda.core`` with an older
``cuda-bindings`` fails with a message that names the required version and how to install it.
``pip install cuda-core[cu12]`` or ``pip install cuda-core[cu13]`` installs a compatible
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies = [
# checklist in AGENTS.md). Keep the form `>=<floor>,<<next major>`.
[project.optional-dependencies]
cu12 = ["cuda-bindings[all]>=12.9.8,<13", "cuda-toolkit==12.*"]
cu13 = ["cuda-bindings[all]>=13.4.1,<14", "cuda-toolkit==13.*"]
cu13 = ["cuda-bindings[all]>=13.5.0,<14", "cuda-toolkit==13.*"]

[dependency-groups]
# Keep build in sync with build-system.requires; install local cuda-pathfinder separately.
Expand Down
13 changes: 12 additions & 1 deletion cuda_core/tests/test_build_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,17 @@ def _write_cuda_h(tmp_path, cuda_version):
return str(tmp_path)


def _mismatched_headers():
"""CUDA_VERSION values one minor below and one minor above the floor of each
major. Derived from the floors so that bumping one does not make a case
match."""
headers = []
for floor in build_hooks._bindings_floors().values():
for minor in (floor[1] - 1, floor[1] + 1):
headers.append(floor[0] * 1000 + minor * 10)
return sorted(headers)


class TestBuildConfigurationCheck:
"""_check_build_configuration() accepts exactly one configuration per CUDA
major: cuda-bindings at or above the floor, and a cuda.h of the same
Expand Down Expand Up @@ -690,7 +701,7 @@ def test_bindings_of_another_major_fail(self, tmp_path, monkeypatch):
build_hooks._check_build_configuration(cuda_path, "12")

@pytest.mark.agent_authored(model="claude-fable-5-1")
@pytest.mark.parametrize("header", [13030, 13050, 12090])
@pytest.mark.parametrize("header", _mismatched_headers())
def test_header_minor_must_match_bindings(self, tmp_path, monkeypatch, header):
floor = self.FLOOR[13]
_fake_bindings(monkeypatch, _floor_str(13))
Expand Down
Loading