From 8f6d957114eec915383b145a4367c54070e9cd7d Mon Sep 17 00:00:00 2001 From: Prabhat Roy Date: Mon, 25 Oct 2021 17:09:59 +0100 Subject: [PATCH 1/2] Removed unnecessary if from setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 48e9c92e127..fa9bfa37f65 100644 --- a/setup.py +++ b/setup.py @@ -143,7 +143,7 @@ def get_extensions(): 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 + is_rocm_pytorch = (torch.version.hip is not None) and (ROCM_HOME is not None) if is_rocm_pytorch: from torch.utils.hipify import hipify_python From 05b9624bef26b9ab464a479142ba8bac31d90e04 Mon Sep 17 00:00:00 2001 From: Prabhat Roy Date: Mon, 25 Oct 2021 17:30:31 +0100 Subject: [PATCH 2/2] Removed empty line --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index fa9bfa37f65..c75c46424ea 100644 --- a/setup.py +++ b/setup.py @@ -159,7 +159,6 @@ def get_extensions(): # Copy over additional files for file in glob.glob(r"torchvision/csrc/ops/cuda/*.h"): shutil.copy(file, "torchvision/csrc/ops/hip") - else: source_cuda = glob.glob(os.path.join(extensions_dir, "ops", "cuda", "*.cu"))