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
apex
Commits
50689f6a
"src/vscode:/vscode.git/clone" did not exist on "c750a823747b7c0fe683290782a0e3df70132630"
Unverified
Commit
50689f6a
authored
May 22, 2019
by
mcarilli
Committed by
GitHub
May 22, 2019
Browse files
Hard error on Pytorch Cuda + Cuda toolkit version mismatch (#323)
parent
ccffa71c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
setup.py
setup.py
+3
-4
No files found.
setup.py
View file @
50689f6a
...
@@ -47,10 +47,9 @@ def check_cuda_torch_binary_vs_bare_metal(cuda_dir):
...
@@ -47,10 +47,9 @@ def check_cuda_torch_binary_vs_bare_metal(cuda_dir):
print
(
raw_output
+
"from "
+
cuda_dir
+
"/bin
\n
"
)
print
(
raw_output
+
"from "
+
cuda_dir
+
"/bin
\n
"
)
if
(
bare_metal_major
!=
torch_binary_major
)
or
(
bare_metal_minor
!=
torch_binary_minor
):
if
(
bare_metal_major
!=
torch_binary_major
)
or
(
bare_metal_minor
!=
torch_binary_minor
):
# TODO: make this a hard error?
raise
RuntimeError
(
"Cuda extensions are being compiled with a version of Cuda that does "
print
(
"
\n
Warning: Cuda extensions are being compiled with a version of Cuda that does "
"not match the version used to compile Pytorch binaries. "
"not match the version used to compile Pytorch binaries.
\n
"
)
"Pytorch binaries were compiled with Cuda {}.
\n
"
.
format
(
torch
.
version
.
cuda
))
print
(
"Pytorch binaries were compiled with Cuda {}
\n
"
.
format
(
torch
.
version
.
cuda
))
if
"--cuda_ext"
in
sys
.
argv
:
if
"--cuda_ext"
in
sys
.
argv
:
from
torch.utils.cpp_extension
import
CUDAExtension
from
torch.utils.cpp_extension
import
CUDAExtension
...
...
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