Skip to content

Commit

Permalink
fix(lmp): update print_summary (#4271)
Browse files Browse the repository at this point in the history
1. Remove out-of-date float prec;
2. Include PyTorch libraries and include directories.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Updated output messages for build information to enhance clarity,
transitioning from TensorFlow-specific references to backend-oriented
configurations.
- **Bug Fixes**
- Improved handling of backend include directories and library paths for
better compatibility.
- **Documentation**
- Enhanced clarity in build information outputs related to backend
configurations.
<!-- 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>
  • Loading branch information
njzjz and pre-commit-ci[bot] authored Oct 31, 2024
1 parent d165fee commit 0cee887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions source/lmp/deepmd_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define GIT_BRANCH @GIT_BRANCH@
#define GIT_DATE @GIT_DATE@
#define DEEPMD_ROOT @CMAKE_INSTALL_PREFIX@
#define TensorFlow_INCLUDE_DIRS @TensorFlow_INCLUDE_DIRS@
#define TensorFlow_LIBRARY @TensorFlow_LIBRARY@
#define BACKEND_INCLUDE_DIRS @BACKEND_INCLUDE_DIRS@
#define BACKEND_LIBRARY_PATH @BACKEND_LIBRARY_PATH@
#define DPMD_CVT_STR(...) #__VA_ARGS__
#define DPMD_CVT_ASSTR(X) DPMD_CVT_STR(X)
#define STR_GIT_SUMM DPMD_CVT_ASSTR(GIT_SUMM)
Expand All @@ -13,5 +13,5 @@
#define STR_GIT_DATE DPMD_CVT_ASSTR(GIT_DATE)
#define STR_FLOAT_PREC DPMD_CVT_ASSTR(FLOAT_PREC)
#define STR_DEEPMD_ROOT DPMD_CVT_ASSTR(DEEPMD_ROOT)
#define STR_TensorFlow_INCLUDE_DIRS DPMD_CVT_ASSTR(TensorFlow_INCLUDE_DIRS)
#define STR_TensorFlow_LIBRARY DPMD_CVT_ASSTR(TensorFlow_LIBRARY)
#define STR_BACKEND_INCLUDE_DIRS DPMD_CVT_ASSTR(BACKEND_INCLUDE_DIRS)
#define STR_BACKEND_LIBRARY_PATH DPMD_CVT_ASSTR(BACKEND_LIBRARY_PATH)
6 changes: 2 additions & 4 deletions source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,8 @@ void PairDeepMD::print_summary(const string pre) const {
cout << pre << "source branch: " << STR_GIT_BRANCH << endl;
cout << pre << "source commit: " << STR_GIT_HASH << endl;
cout << pre << "source commit at: " << STR_GIT_DATE << endl;
cout << pre << "build float prec: " << STR_FLOAT_PREC << endl;
cout << pre << "build with tf inc: " << STR_TensorFlow_INCLUDE_DIRS
<< endl;
cout << pre << "build with tf lib: " << STR_TensorFlow_LIBRARY << endl;
cout << pre << "build with inc: " << STR_BACKEND_INCLUDE_DIRS << endl;
cout << pre << "build with lib: " << STR_BACKEND_LIBRARY_PATH << endl;

std::cout.rdbuf(sbuf);
utils::logmesg(lmp, buffer.str());
Expand Down

0 comments on commit 0cee887

Please sign in to comment.