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
vision
Commits
f3aff2fa
Unverified
Commit
f3aff2fa
authored
Aug 17, 2021
by
Jithun Nair
Committed by
GitHub
Aug 17, 2021
Browse files
Make torch version check numeric (#4285)
Co-authored-by:
Vasilis Vryniotis
<
datumbox@users.noreply.github.com
>
parent
af16236d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
setup.py
setup.py
+3
-1
No files found.
setup.py
View file @
f3aff2fa
...
...
@@ -147,7 +147,9 @@ def get_extensions():
)
is_rocm_pytorch
=
False
if
torch
.
__version__
>=
'1.5'
:
TORCH_MAJOR
=
int
(
torch
.
__version__
.
split
(
'.'
)[
0
])
TORCH_MINOR
=
int
(
torch
.
__version__
.
split
(
'.'
)[
1
])
if
TORCH_MAJOR
>
1
or
(
TORCH_MAJOR
==
1
and
TORCH_MINOR
>=
5
):
from
torch.utils.cpp_extension
import
ROCM_HOME
is_rocm_pytorch
=
True
if
((
torch
.
version
.
hip
is
not
None
)
and
(
ROCM_HOME
is
not
None
))
else
False
...
...
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