Update setup.py

This commit is contained in:
Daniel Han 2025-07-01 00:32:23 -07:00
commit 508be34294

View file

@ -28,11 +28,9 @@ IS_COLAB = "COLAB_" not in "".join(os.environ.keys())
# Try importing torch
HAS_TORCH = False
HAS_CUDA = False
HAS_CUDA = True
HAS_HIP = False
torch = None
print(f"Unsloth: Imported torch with CUDA_HOME = {str(CUDA_HOME)}.")
print(f"Unsloth: Imported torch with ROCM_HOME = {str(ROCM_HOME)}.")
if importlib.util.find_spec("torch") is not None:
try:
import torch