-
Notifications
You must be signed in to change notification settings - Fork 540
fix(cmake): set C++ standard according to the PyTorch version #3973
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
Conversation
Copy from deepmodeling/abacus-develop#3277 Signed-off-by: Jinzhe Zeng <[email protected]>
WalkthroughWalkthroughThe main change involves adding a macro Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CMake
participant Torch
User->>CMake: Runs cmake configuration
CMake->>Torch: Check Torch version
Torch-->>CMake: Returns Torch version
alt Torch version >= 2.1.0
CMake->>CMake: set_if_higher(CMAKE_CXX_STANDARD 17)
else Torch version >= 1.5.0
CMake->>CMake: set_if_higher(CMAKE_CXX_STANDARD 14)
end
CMake->>Torch: Find package Torch
Torch-->>CMake: Returns Torch package details
CMake->>CMake: string regex match for CXXABI_PT_MATCH
alt CXXABI_PT_MATCH found
CMake->>CMake: Execute conditional logic based on CXXABI_PT_MATCH
end
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
for more information, see https://pre-commit.ci
Signed-off-by: Jinzhe Zeng <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3973 +/- ##
=======================================
Coverage 82.82% 82.83%
=======================================
Files 522 522
Lines 50867 50867
Branches 3015 3015
=======================================
+ Hits 42133 42135 +2
Misses 7794 7794
+ Partials 940 938 -2 ☔ View full report in Codecov by Sentry. |
…deling#3973) Copied from deepmodeling/abacus-develop#3277 authored by @caic99 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced compatibility with different Torch versions by dynamically setting the appropriate C++ standard (C++14 or C++17) based on the Torch version. - **Improvements** - Improved build process with automatic detection and configuration of Torch version dependencies. - Enhanced robustness with additional checks and conditional logic for Torch integration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copied from deepmodeling/abacus-develop#3277 authored by @caic99
Summary by CodeRabbit