Skip to content

Commit 32ba752

Browse files
authored
Support PTX ISA 9.4 and test CUDA release coverage (#3348)
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1 parent 54f97d7 commit 32ba752

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎cuda_bindings_13/cuda/bindings/utils/_ptx_utils.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"9.1": (13, 1),
5252
"9.2": (13, 2),
5353
"9.3": (13, 3),
54+
"9.4": (13, 4),
5455
}
5556

5657

‎cuda_bindings_13/tests/test_utils.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
get_minimal_required_cuda_ver_from_ptx_ver,
1818
get_ptx_ver,
1919
)
20+
from cuda.bindings.utils._ptx_utils import _ptx_to_cuda
2021

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

@@ -72,6 +73,16 @@ def test_ptx_utils(kernel, actual_ptx_ver, min_cuda_ver):
7273
assert cuda_ver == min_cuda_ver
7374

7475

76+
@pytest.mark.agent_authored(model="gpt-6")
77+
def test_ptx_mapping_covers_bindings_cuda_version():
78+
"""Keep the PTX table in sync with the CUDA release of the generated bindings."""
79+
cuda_version = (driver.CUDA_VERSION // 1000, (driver.CUDA_VERSION % 1000) // 10)
80+
assert cuda_version in _ptx_to_cuda.values(), (
81+
f"No PTX ISA mapping for CUDA {cuda_version[0]}.{cuda_version[1]}. "
82+
"Check the PTX ISA release history and update cuda_bindings_13/cuda/bindings/utils/_ptx_utils.py."
83+
)
84+
85+
7586
@pytest.mark.parametrize(
7687
"target",
7788
(

0 commit comments

Comments
 (0)