Skip to content

Commit

Permalink
ci: Improve compatibility with pytorch 2.5 (#711)
Browse files Browse the repository at this point in the history
- Fix release workflow for pytorch 2.5 wheel by dropping python 3.8.
- Relax pytorch version requirements.
- Right now, install flashinfer will downgrade existing pytorch versions
since it's set the version requirement to exact match.
  • Loading branch information
zifeitong authored Jan 3, 2025
1 parent ccd3be9 commit 644ccd7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
torch: "2.2"
- cuda: "12.4"
torch: "2.3"
- python: "3.8" # torch 2.5+ drops python 3.8
torch: "2.5"

runs-on: [self-hosted]
steps:
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-ci-build-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ else
fi

echo "::group::Install PyTorch"
pip install torch==$FLASHINFER_CI_TORCH_VERSION --index-url "https://download.pytorch.org/whl/cu${CUDA_MAJOR}${CUDA_MINOR}"
pip install torch==${FLASHINFER_CI_TORCH_VERSION}.* --index-url "https://download.pytorch.org/whl/cu${CUDA_MAJOR}${CUDA_MINOR}"
echo "::endgroup::"

echo "::group::Install build system"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, *args, **kwargs) -> None:
torch_full_version = Version(torch.__version__)
torch_version = f"{torch_full_version.major}.{torch_full_version.minor}"
cmdclass["build_ext"] = NinjaBuildExtension
install_requires = [f"torch == {torch_version}"]
install_requires = [f"torch == {torch_version}.*"]

aot_build_meta = {}
aot_build_meta["cuda_major"] = cuda_version.major
Expand Down

0 comments on commit 644ccd7

Please sign in to comment.