Skip to content

Commit 0cee887

Browse files
fix(lmp): update print_summary (#4271)
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>
1 parent d165fee commit 0cee887

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

source/lmp/deepmd_version.h.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#define GIT_BRANCH @GIT_BRANCH@
44
#define GIT_DATE @GIT_DATE@
55
#define DEEPMD_ROOT @CMAKE_INSTALL_PREFIX@
6-
#define TensorFlow_INCLUDE_DIRS @TensorFlow_INCLUDE_DIRS@
7-
#define TensorFlow_LIBRARY @TensorFlow_LIBRARY@
6+
#define BACKEND_INCLUDE_DIRS @BACKEND_INCLUDE_DIRS@
7+
#define BACKEND_LIBRARY_PATH @BACKEND_LIBRARY_PATH@
88
#define DPMD_CVT_STR(...) #__VA_ARGS__
99
#define DPMD_CVT_ASSTR(X) DPMD_CVT_STR(X)
1010
#define STR_GIT_SUMM DPMD_CVT_ASSTR(GIT_SUMM)
@@ -13,5 +13,5 @@
1313
#define STR_GIT_DATE DPMD_CVT_ASSTR(GIT_DATE)
1414
#define STR_FLOAT_PREC DPMD_CVT_ASSTR(FLOAT_PREC)
1515
#define STR_DEEPMD_ROOT DPMD_CVT_ASSTR(DEEPMD_ROOT)
16-
#define STR_TensorFlow_INCLUDE_DIRS DPMD_CVT_ASSTR(TensorFlow_INCLUDE_DIRS)
17-
#define STR_TensorFlow_LIBRARY DPMD_CVT_ASSTR(TensorFlow_LIBRARY)
16+
#define STR_BACKEND_INCLUDE_DIRS DPMD_CVT_ASSTR(BACKEND_INCLUDE_DIRS)
17+
#define STR_BACKEND_LIBRARY_PATH DPMD_CVT_ASSTR(BACKEND_LIBRARY_PATH)

source/lmp/pair_deepmd.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,8 @@ void PairDeepMD::print_summary(const string pre) const {
437437
cout << pre << "source branch: " << STR_GIT_BRANCH << endl;
438438
cout << pre << "source commit: " << STR_GIT_HASH << endl;
439439
cout << pre << "source commit at: " << STR_GIT_DATE << endl;
440-
cout << pre << "build float prec: " << STR_FLOAT_PREC << endl;
441-
cout << pre << "build with tf inc: " << STR_TensorFlow_INCLUDE_DIRS
442-
<< endl;
443-
cout << pre << "build with tf lib: " << STR_TensorFlow_LIBRARY << endl;
440+
cout << pre << "build with inc: " << STR_BACKEND_INCLUDE_DIRS << endl;
441+
cout << pre << "build with lib: " << STR_BACKEND_LIBRARY_PATH << endl;
444442

445443
std::cout.rdbuf(sbuf);
446444
utils::logmesg(lmp, buffer.str());

0 commit comments

Comments
 (0)