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
1 change: 1 addition & 0 deletions cuda_bindings_13/cuda/bindings/utils/_ptx_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"9.1": (13, 1),
"9.2": (13, 2),
"9.3": (13, 3),
"9.4": (13, 4),
}


Expand Down
11 changes: 11 additions & 0 deletions cuda_bindings_13/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
get_minimal_required_cuda_ver_from_ptx_ver,
get_ptx_ver,
)
from cuda.bindings.utils._ptx_utils import _ptx_to_cuda

have_cufile = importlib.util.find_spec("cuda.bindings.cufile") is not None

Expand Down Expand Up @@ -72,6 +73,16 @@ def test_ptx_utils(kernel, actual_ptx_ver, min_cuda_ver):
assert cuda_ver == min_cuda_ver


@pytest.mark.agent_authored(model="gpt-6")
def test_ptx_mapping_covers_bindings_cuda_version():
"""Keep the PTX table in sync with the CUDA release of the generated bindings."""
cuda_version = (driver.CUDA_VERSION // 1000, (driver.CUDA_VERSION % 1000) // 10)
assert cuda_version in _ptx_to_cuda.values(), (
f"No PTX ISA mapping for CUDA {cuda_version[0]}.{cuda_version[1]}. "
"Check the PTX ISA release history and update cuda_bindings_13/cuda/bindings/utils/_ptx_utils.py."
)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved


@pytest.mark.parametrize(
"target",
(
Expand Down
Loading