diff --git a/pyproject.toml b/pyproject.toml index 9dd8b41fc6..affb813845 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,4 @@ [build-system] -# Should be mirrored in requirements/build.txt requires = [ "packaging>=24.2", "setuptools>=77.0.3,<80.0.0", diff --git a/setup.py b/setup.py index e4e855912c..060e760dd9 100644 --- a/setup.py +++ b/setup.py @@ -23,11 +23,10 @@ from setuptools import setup from setuptools.command.install import install ROOT_DIR = Path(__file__).parent -UNSLOTH_TARGET_DEVICE = os.environ.get("UNSLOTH_TARGET_DEVICE", "cuda") IS_COLAB = "COLAB_" not in "".join(os.environ.keys()) -import torch -from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME +output = subprocess.run(["python", "-c", "from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME; from torch.version import cuda, hip; print(CUDA_HOME); print(ROCM_HOME); print(cuda); print(hip);"], capture_output = True, text = True) +print(output) # Try importing torch HAS_TORCH = False