Skip to content

Commit

Permalink
Let installed PyTorch decide required version number (#573)
Browse files Browse the repository at this point in the history
Co-authored-by: Casper <[email protected]>
  • Loading branch information
wasertech and casper-hansen authored Sep 12, 2024
1 parent 1523880 commit d5ec43d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
PYPI_BUILD = os.getenv("PYPI_BUILD", "0") == "1"
INSTALL_KERNELS = os.getenv("INSTALL_KERNELS", "0") == "1"
IS_CPU_ONLY = not torch.backends.mps.is_available() and not torch.cuda.is_available()
TORCH_VERSION = str(os.getenv("TORCH_VERSION", None) or torch.__version__).split('+', maxsplit=1)[0]

CUDA_VERSION = os.getenv("CUDA_VERSION", None) or torch.version.cuda
if CUDA_VERSION:
Expand Down Expand Up @@ -58,7 +59,7 @@
}

requirements = [
"torch>=2.3.1",
f"torch>={TORCH_VERSION}",
"triton",
"transformers>=4.35.0",
"tokenizers>=0.12.1",
Expand Down

0 comments on commit d5ec43d

Please sign in to comment.