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
221dd5f7
Unverified
Commit
221dd5f7
authored
Oct 11, 2021
by
Muhammed Abdullah
Committed by
GitHub
Oct 11, 2021
Browse files
Updated setup.py to use TorchVersion object for version comparision (#4307)
parent
a9940fe4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
setup.py
setup.py
+2
-3
No files found.
setup.py
View file @
221dd5f7
...
@@ -139,9 +139,8 @@ def get_extensions():
...
@@ -139,9 +139,8 @@ def get_extensions():
)
)
is_rocm_pytorch
=
False
is_rocm_pytorch
=
False
TORCH_MAJOR
=
int
(
torch
.
__version__
.
split
(
"."
)[
0
])
TORCH_MINOR
=
int
(
torch
.
__version__
.
split
(
"."
)[
1
])
if
torch
.
__version__
>=
"1.5"
:
if
TORCH_MAJOR
>
1
or
(
TORCH_MAJOR
==
1
and
TORCH_MINOR
>=
5
):
from
torch.utils.cpp_extension
import
ROCM_HOME
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
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