Skip to content

Commit

Permalink
Relax the torch version dependency
Browse files Browse the repository at this point in the history
The PyTorch project has released the patch version 2.3.1 with a number
of fixes. This change relaxes the version in the requirements files for
build and CUDA, in order to allow picking fixes, while not bumping to
the next minor version.

Signed-off-by: Fabien Dupont <[email protected]>
  • Loading branch information
fabiendupont committed Jul 10, 2024
1 parent c624c10 commit 4e9fcad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requires = [
"ninja",
"packaging",
"setuptools >= 49.4.0",
"torch == 2.3.0",
"torch >=2.3.0, <2.4.0",
"wheel",
]
build-backend = "setuptools.build_meta"
Expand Down
14 changes: 7 additions & 7 deletions requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Should be mirrored in pyproject.toml
cmake>=3.21
ninja
packaging
setuptools>=49.4.0
torch==2.3.0
wheel
# Should be mirrored in pyproject.toml
cmake>=3.21
ninja
packaging
setuptools>=49.4.0
torch >=2.3.0, <2.4.0
wheel
2 changes: 1 addition & 1 deletion requirements-cpu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
-r requirements-common.txt

# Dependencies for x86_64 CPUs
torch == 2.3.1+cpu; platform_machine != "ppc64le"
torch >= 2.3.1+cpu, <2.4.0+cpu; platform_machine != "ppc64le"
torchvision == 0.18.1+cpu; platform_machine != "ppc64le" # required for the image processor of phi3v, this must be updated alongside torch
triton >= 2.2.0 # FIXME(woosuk): This is a hack to avoid import error.
2 changes: 1 addition & 1 deletion requirements-cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Dependencies for NVIDIA GPUs
ray >= 2.9
nvidia-ml-py # for pynvml package
torch == 2.3.0
torch >= 2.3.0, <2.4.0
# These must be updated alongside torch
torchvision == 0.18.0 # Required for phi3v processor, also see https://github.com/pytorch/vision?tab=readme-ov-file#installation for corresponding version
xformers == 0.0.26.post1 # Requires PyTorch 2.3.0
Expand Down

0 comments on commit 4e9fcad

Please sign in to comment.