Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
310f240c
Commit
310f240c
authored
Feb 14, 2023
by
Zhouran Qiao zhuoran.qiao@entos.ai
Browse files
Resolving torch cuda availablity for cpu-only installation
parent
b2d6bff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
setup.py
setup.py
+2
-1
No files found.
setup.py
View file @
310f240c
...
...
@@ -16,6 +16,7 @@ import os
from
setuptools
import
setup
,
Extension
,
find_packages
import
subprocess
import
torch
from
torch.utils.cpp_extension
import
BuildExtension
,
CppExtension
,
CUDAExtension
,
CUDA_HOME
from
scripts.utils
import
get_nvidia_cc
...
...
@@ -37,7 +38,7 @@ extra_cuda_flags = [
]
def
get_cuda_bare_metal_version
(
cuda_dir
):
if
cuda_dir
==
None
:
if
cuda_dir
==
None
or
torch
.
version
.
cuda
==
None
:
print
(
"CUDA is not found, cpu version is installed"
)
return
None
,
-
1
,
0
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment