Skip to content

Commit 220ad12

Browse files
authored
Merge pull request #11 from teddykoker/docker-fix
docker fix
2 parents ce5be69 + df7f966 commit 220ad12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from functools import lru_cache
66
from subprocess import DEVNULL, call
77

8+
import torch
89
from setuptools import setup
910
from torch.utils import cpp_extension
1011

@@ -14,7 +15,7 @@ def cuda_toolkit_available():
1415
# https://github.com/idiap/fast-transformers/blob/master/setup.py
1516
try:
1617
call(["nvcc"], stdout=DEVNULL, stderr=DEVNULL)
17-
return True
18+
return True and torch.cuda.is_available()
1819
except FileNotFoundError:
1920
return False
2021

@@ -50,7 +51,7 @@ def ext_modules():
5051

5152
setup(
5253
name="torchsort",
53-
version="0.1.0",
54+
version="0.1.1",
5455
description="Differentiable sorting and ranking in PyTorch",
5556
author="Teddy Koker",
5657
url="https://github.com/teddykoker/torchsort",

0 commit comments

Comments
 (0)