Skip to content
Open
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
4 changes: 2 additions & 2 deletions cuda_bindings/cuda/bindings/utils/_ptx_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def get_minimal_required_cuda_ver_from_ptx_ver(ptx_version: str) -> int:

Examples
--------
>>> get_minimal_required_driver_ver_from_ptx_ver("8.8")
>>> get_minimal_required_cuda_ver_from_ptx_ver("8.8")
12090
>>> get_minimal_required_driver_ver_from_ptx_ver("7.0")
>>> get_minimal_required_cuda_ver_from_ptx_ver("7.0")
11000
"""
try:
Expand Down
12 changes: 12 additions & 0 deletions cuda_bindings/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ def test_ptx_utils(kernel, actual_ptx_ver, min_cuda_ver):
assert cuda_ver == min_cuda_ver


@pytest.mark.agent_authored(model="claude-opus-5")
def test_ptx_utils_docstring_examples():
"""The examples are rendered into the public docs; they have to run."""
import doctest

from cuda.bindings.utils import _ptx_utils

results = doctest.testmod(_ptx_utils, verbose=False, report=False)
assert results.attempted > 0
assert results.failed == 0


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