Skip to content

Commit

Permalink
move pip install
Browse files Browse the repository at this point in the history
Signed-off-by: Sun, Xuehao <[email protected]>
  • Loading branch information
XuehaoSun committed Dec 11, 2024
1 parent db4a175 commit afdef17
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

def is_cuda_available():
try:
os.system("pip install torch")
import torch

return torch.cuda.is_available()
Expand Down Expand Up @@ -112,10 +113,6 @@ def detect_local_sm_architectures():


def detect_hardware():
try:
os.system("pip install torch")
except:
print("Failed to install torch")
if is_hpu_available():
return "requirements-hpu.txt"
elif is_cuda_available():
Expand Down

0 comments on commit afdef17

Please sign in to comment.