Skip to content

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented Apr 28, 2025

Summary by CodeRabbit

  • 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.

@njzjz njzjz requested review from Copilot and wanghan-iapcm April 28, 2025 09:54
Copy link
Contributor

Copilot AI left a 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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 28, 2025

📝 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/test

Possibly related PRs

Suggested reviewers

  • wanghan-iapcm

</details>

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 921693a37b37038cae323041990ab48dc72f6d4a and e8f4338317fc9cd5a290d268d3cd6e58fed12a17.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `.github/workflows/test_cuda.yml` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* .github/workflows/test_cuda.yml

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (29)</summary>

* GitHub Check: Test Python (6, 3.12)
* GitHub Check: Test Python (6, 3.9)
* GitHub Check: Test Python (5, 3.12)
* GitHub Check: Test Python (5, 3.9)
* GitHub Check: Test Python (4, 3.12)
* GitHub Check: Test Python (4, 3.9)
* GitHub Check: Test Python (3, 3.12)
* GitHub Check: Build wheels for cp310-manylinux_aarch64
* GitHub Check: Test Python (3, 3.9)
* GitHub Check: Build wheels for cp311-win_amd64
* GitHub Check: Test Python (2, 3.12)
* GitHub Check: Build C++ (clang, clang)
* GitHub Check: Build wheels for cp311-macosx_arm64
* GitHub Check: Test Python (2, 3.9)
* GitHub Check: Build C++ (rocm, rocm)
* GitHub Check: Build wheels for cp311-macosx_x86_64
* GitHub Check: Test Python (1, 3.12)
* GitHub Check: Test C++ (false)
* GitHub Check: Build wheels for cp311-manylinux_x86_64
* GitHub Check: Analyze (python)
* GitHub Check: Build C++ (cuda120, cuda)
* GitHub Check: Test Python (1, 3.9)
* GitHub Check: Build C++ (cuda, cuda)
* GitHub Check: Build wheels for cp311-manylinux_x86_64
* GitHub Check: Build C library (2.14, >=2.5.0rc0,<2.15, libdeepmd_c_cu11.tar.gz)
* GitHub Check: Test C++ (true)
* GitHub Check: Build C++ (cpu, cpu)
* GitHub Check: Build C library (2.18, libdeepmd_c.tar.gz)
* GitHub Check: Analyze (c-cpp)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4BhAJJcB2Zt0gAFWdHwUGsSAUgAJg0AdgMAOWcBSi4AFhCARjCAVUQYyAwhAC9so31jcCgyenwAMxwCYjJlGnomVnYuXn5hUXEpGXkmJSpVdS0dfJMoOFRUTArCUnIqWoUGjE5IKgB3SERnZjQKeTkFHpU1TW1dMEMC0wMNJQkmRe0ZgHpafBWMC3w0WgB9C3gBAg+WAaRCwDgGABEUIMAGIYZA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IfTfUV3lLlez7Amka7nHiS55DQ+4njRX4ebo5DZnMyPvLZ4DBD4BYEHqKHwZWhV/x8cCkClfg5VelZ26JrV9WNa8RqUH6fBzrQfzzka1pkMOfoYGwizrJJ9LoHmLUeSXMuS664ahbiHoNUQw1Nxw3KOeQu14+C3jmk+cQS0oClXLuJeBU0ShINmtqea4hcDyCGiNcB0MSRbCUAZMUqBaylFKEubCeRLgCEbsUR4WoOzfG4LIXeGg+HnRwpdZE11ZhEUxA9HE5ciQkgphPDeWBaSCiIOQbmnsY5KNzsEM8kBQpWyJtqem8hF46O0vFWh4pwrGV4UhPM6V4CTnYOFS0TYxAaWEo2QOPo/QhwhOHSMEJxIBPkhGCESVUBPXQIwto3Ey7ClrKNQcDVKqEJYlSJQG5mCo3iWPSm2iHHYCcf5TK7C0glGruKMxqdX5OOFJ/KkEhtjwBUO6OWZBIBODdPZeswYpQYGwHos8AAOUM3xQwJ0zmKM2dgABCyQ7ASj+gAdQABIAFENkWjIG0ugJVEyH2JBVfAVV+B8Bvtae+j96xeNagwjqQCVx4VATA/qiYXJkLeSeOBk0i7TXwXeQhqC8Z5H3mfOcBIIEklUYOXA2BLbjRwf8vBPACEPhBdIZh358gGGGPNEo5Q0B4CmNUCRdQWCNK4KsDEJEHp7G6MoPoxxBhnDxYUeYOSkLwC4t8PMw5uR0G+G3Iupxzj4oAJyBASKGCVABmNAcqQgCCVRGOVIydQkDlYEOVEZYgJAlRKiMKhYgjNoAwEIgRSihloLEZmQwOUkBGaUWIcr1VyqSKUBgEqGC0AAKxoECEa2ggRQxmrlb60MJA/XOroHHNASQxUXCgG2dQ3weWID5SQAVPIfjFDFUAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=deepmodeling/deepmd-kit&utm_content=4717):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.80%. Comparing base (a6ff9be) to head (e8f4338).
⚠️ Report is 75 commits behind head on devel.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Apr 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2025
Signed-off-by: Jinzhe Zeng <njzjz@qq.com>
@njzjz njzjz enabled auto-merge April 29, 2025 12:45
@njzjz njzjz added this pull request to the merge queue Apr 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2025
@njzjz njzjz added this pull request to the merge queue Apr 29, 2025
Merged via the queue into deepmodeling:devel with commit 99c9dc2 Apr 29, 2025
60 checks passed
@njzjz njzjz deleted the pt27 branch April 29, 2025 20:35
@njzjz njzjz added this to the v3.0.3 milestone May 21, 2025
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request May 21, 2025
<!-- 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>
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request May 21, 2025
<!-- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants