Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zasdfgbnm committed Jan 25, 2021
1 parent 2da17c9 commit c33a608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch/testing/_internal/common_cuda.py
Expand Up @@ -6,6 +6,7 @@
from torch.testing._internal.common_utils import TEST_NUMBA
import inspect
import contextlib
from distutils.version import LooseVersion


TEST_CUDA = torch.cuda.is_available()
Expand All @@ -15,7 +16,7 @@
TEST_CUDNN = TEST_CUDA and torch.backends.cudnn.is_acceptable(torch.tensor(1., device=CUDA_DEVICE))
TEST_CUDNN_VERSION = torch.backends.cudnn.version() if TEST_CUDNN else 0

CUDA11OrLater = torch.version.cuda and float(torch.version.cuda) >= 11
CUDA11OrLater = torch.version.cuda and LooseVersion(torch.version.cuda) >= "11.0.0"
CUDA9 = torch.version.cuda and torch.version.cuda.startswith('9.')
SM53OrLater = torch.cuda.is_available() and torch.cuda.get_device_capability() >= (5, 3)

Expand Down

0 comments on commit c33a608

Please sign in to comment.