mmcv/tests/test_ops/test_info.py
Zaida Zhou 45fa3e44a2
Add pyupgrade pre-commit hook (#1937)
* add pyupgrade

* add options for pyupgrade

* minor refinement
2022-05-18 11:47:14 +08:00

15 lines
384 B
Python

# Copyright (c) OpenMMLab. All rights reserved.
import torch
class TestInfo:
def test_info(self):
if not torch.cuda.is_available():
return
from mmcv.ops import get_compiler_version, get_compiling_cuda_version
cv = get_compiler_version()
ccv = get_compiling_cuda_version()
assert cv is not None
assert ccv is not None