True if a CUDA device is present and nvcc is at least ``(major, minor, release)``. Returns False when no CUDA device is present, so it implies :func:`has_cuda`. Gate a test with ``@pytest.mark.skipif(not tvm.testing.env.has_nvcc_version(11, 4), reason="need nvcc >= 11.4")`` (add ``@pyte
(major: int, minor: int = 0, release: int = 0)
| 341 | |
| 342 | |
| 343 | def has_nvcc_version(major: int, minor: int = 0, release: int = 0) -> bool: |
| 344 | """True if a CUDA device is present and nvcc is at least ``(major, minor, release)``. |
| 345 | |
| 346 | Returns False when no CUDA device is present, so it implies :func:`has_cuda`. |
| 347 | Gate a test with ``@pytest.mark.skipif(not tvm.testing.env.has_nvcc_version(11, 4), |
| 348 | reason="need nvcc >= 11.4")`` (add ``@pytest.mark.gpu`` for GPU selection). |
| 349 | """ |
| 350 | return has_cuda() and _nvcc_version() >= (major, minor, release) |
| 351 | |
| 352 | |
| 353 | @functools.cache |
nothing calls this directly
no test coverage detected
searching dependent graphs…