We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ce5be69 + df7f966 commit 220ad12Copy full SHA for 220ad12
1 file changed
setup.py
@@ -5,6 +5,7 @@
5
from functools import lru_cache
6
from subprocess import DEVNULL, call
7
8
+import torch
9
from setuptools import setup
10
from torch.utils import cpp_extension
11
@@ -14,7 +15,7 @@ def cuda_toolkit_available():
14
15
# https://github.com/idiap/fast-transformers/blob/master/setup.py
16
try:
17
call(["nvcc"], stdout=DEVNULL, stderr=DEVNULL)
- return True
18
+ return True and torch.cuda.is_available()
19
except FileNotFoundError:
20
return False
21
@@ -50,7 +51,7 @@ def ext_modules():
50
51
52
setup(
53
name="torchsort",
- version="0.1.0",
54
+ version="0.1.1",
55
description="Differentiable sorting and ranking in PyTorch",
56
author="Teddy Koker",
57
url="https://github.com/teddykoker/torchsort",
0 commit comments