Skip to content

Commit

Permalink
[fbsync] Updated setup.py to use TorchVersion object for version comp…
Browse files Browse the repository at this point in the history
…arision (#4307)

Reviewed By: fmassa

Differential Revision: D31649964

fbshipit-source-id: 670d26caf53ffc9127ed22afc74cec8ec5641595
  • Loading branch information
prabhat00155 authored and facebook-github-bot committed Oct 14, 2021
1 parent 5a270a5 commit fd58d13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ def get_extensions():
)

is_rocm_pytorch = False
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):

if torch.__version__ >= "1.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
Expand Down

0 comments on commit fd58d13

Please sign in to comment.