-
Notifications
You must be signed in to change notification settings - Fork 584
CI: bump PyTorch to 2.7 #4717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: bump PyTorch to 2.7 #4717
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR bumps the PyTorch version used in the CI pipelines to 2.7.0.
- Updates the fallback version for CUDA builds in backend/find_pytorch.py.
- Adjusts the pip install commands and libtorch download links in both CUDA and CPU workflows.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| backend/find_pytorch.py | Updated PyTorch version for CUDA 12.2 builds from 2.6.0 to 2.7.0 |
| .github/workflows/test_cuda.yml | Updated pip install command and libtorch download URL for CUDA |
| .github/workflows/test_cc.yml | Updated libtorch download URL for CPU builds |
Files not reviewed (1)
- .devcontainer/download_libtorch.sh: Language not supported
Comments suppressed due to low confidence (3)
backend/find_pytorch.py:119
- The PyTorch version has been updated to 2.7.0, but the associated comment above ("CUDA 12.2, cudnn 9") may now be inaccurate. Please confirm that the compatibility details are still correct or update the comment accordingly.
pt_version = "2.7.0"
.github/workflows/test_cuda.yml:50
- Ensure that updating the torch version to 2.7.0 in the pip install command is fully compatible with the rest of the CUDA workflow and dependency versions.
- run: source/install/uv_with_retry.sh pip install --system "tensorflow~=2.18.0rc2" "torch~=2.7.0" "jax[cuda12]==0.5.0"
.github/workflows/test_cc.yml:39
- Verify that the updated CPU libtorch download URL correctly points to version 2.7.0 and is consistent with the intended configuration for CPU builds in the workflow.
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.7.0%2Bcpu.zip -O libtorch.zip
📝 Walkthrough## Walkthrough
This update synchronizes the PyTorch and LibTorch versions used throughout the project, advancing them from 2.6.0 (or earlier) to 2.7.0. The changes affect script files, CI workflow configurations, and internal logic that determines the required PyTorch version for specific CUDA versions. The modifications ensure that both Python and C++ components, as well as CUDA-enabled workflows, utilize the latest compatible PyTorch and LibTorch releases. No changes were made to exported or public entity declarations, and no control flow or error handling logic was altered.
## Changes
| Files/Paths | Change Summary |
|------------------------------------|--------------------------------------------------------------------------------------------------|
| .devcontainer/download_libtorch.sh | Updated LibTorch download URL to fetch version 2.7.0+cpu instead of 2.6.0+cpu. |
| .github/workflows/test_cc.yml | Changed the LibTorch download step to use version 2.7.0 instead of 2.1.2. |
| .github/workflows/test_cuda.yml | Upgraded PyTorch pip install to 2.7.0 and changed LibTorch CUDA download to 2.7.0 with CUDA 12.6 support. |
| backend/find_pytorch.py | Updated PyTorch version requirement for CUDA 12.x from 2.6.0 to 2.7.0 in `get_pt_requirement` function. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Workflow/Script
participant PyTorch/LibTorch Source
Workflow/Script->>PyTorch/LibTorch Source: Request PyTorch/LibTorch v2.7.0
PyTorch/LibTorch Source-->>Workflow/Script: Download PyTorch/LibTorch v2.7.0
Workflow/Script->>Workflow/Script: Use PyTorch/LibTorch v2.7.0 in build/testPossibly related PRs
Suggested reviewers
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #4717 +/- ##
==========================================
- Coverage 84.81% 84.80% -0.01%
==========================================
Files 696 696
Lines 67264 67265 +1
Branches 3539 3538 -1
==========================================
Hits 57047 57047
- Misses 9085 9086 +1
Partials 1132 1132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Jinzhe Zeng <njzjz@qq.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> - **Chores** - Updated LibTorch and PyTorch versions to 2.7.0 across development scripts and workflows. - Upgraded CUDA support in testing workflows to align with the latest PyTorch and LibTorch releases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <njzjz@qq.com> (cherry picked from commit 99c9dc2) Signed-off-by: Jinzhe Zeng <jinzhe.zeng@ustc.edu.cn>
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> - **Chores** - Updated LibTorch and PyTorch versions to 2.7.0 across development scripts and workflows. - Upgraded CUDA support in testing workflows to align with the latest PyTorch and LibTorch releases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <njzjz@qq.com> (cherry picked from commit 99c9dc2) Signed-off-by: Jinzhe Zeng <jinzhe.zeng@ustc.edu.cn>
Summary by CodeRabbit