From 0cee8872dd3f99d0c3b438bfba09c9cca4917e4a Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 31 Oct 2024 09:05:33 -0400 Subject: [PATCH] fix(lmp): update print_summary (#4271) 1. Remove out-of-date float prec; 2. Include PyTorch libraries and include directories. ## 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. --------- Signed-off-by: Jinzhe Zeng Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- source/lmp/deepmd_version.h.in | 8 ++++---- source/lmp/pair_deepmd.cpp | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/lmp/deepmd_version.h.in b/source/lmp/deepmd_version.h.in index 4b99bc7c33..0b74491778 100644 --- a/source/lmp/deepmd_version.h.in +++ b/source/lmp/deepmd_version.h.in @@ -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) @@ -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) diff --git a/source/lmp/pair_deepmd.cpp b/source/lmp/pair_deepmd.cpp index 09d97fe460..d741814aa5 100644 --- a/source/lmp/pair_deepmd.cpp +++ b/source/lmp/pair_deepmd.cpp @@ -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());