Return the (major, minor) CUDA compute version, or (0, 0) if unknown.
()
| 303 | |
| 304 | @functools.cache |
| 305 | def _cuda_compute_version() -> tuple: |
| 306 | """Return the (major, minor) CUDA compute version, or (0, 0) if unknown.""" |
| 307 | try: |
| 308 | from tvm.support import nvcc # pylint: disable=import-outside-toplevel |
| 309 | |
| 310 | arch = nvcc.get_target_compute_version() |
| 311 | return nvcc.parse_compute_version(arch) |
| 312 | except Exception: # pylint: disable=broad-except |
| 313 | return (0, 0) |
| 314 | |
| 315 | |
| 316 | def has_cuda_compute(major: int, minor: int = 0, exact: bool = False) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…