Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deepmd/train/run_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
f"source commit: {GLOBAL_CONFIG['git_hash']}",
f"source commit at: {GLOBAL_CONFIG['git_date']}",
f"build float prec: {global_float_prec}",
f"build variant: {GLOBAL_CONFIG['dp_variant']}",
f"build with tf inc: {GLOBAL_CONFIG['tf_include_dir']}",
f"build with tf lib: {GLOBAL_CONFIG['tf_libs'].replace(';', _sep)}" # noqa
)
Expand Down
3 changes: 3 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ message(STATUS "Supported model version: ${MODEL_VERSION}")
if (USE_ROCM_TOOLKIT AND USE_CUDA_TOOLKIT)
message (FATAL_ERROR "Devices that have both ROCM and CUDA are not currently supported")
endif()
set(DP_VARIANT "cpu")

# define USE_CUDA_TOOLKIT
if (USE_CUDA_TOOLKIT)
set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "")
find_package(CUDA REQUIRED)
add_definitions("-DGOOGLE_CUDA")
message(STATUS "Found CUDA in ${CUDA_TOOLKIT_ROOT_DIR}, build nv GPU support")
set(DP_VARIANT "cuda")
else()
message(STATUS "Will not build nv GPU support")
endif(USE_CUDA_TOOLKIT)
Expand All @@ -70,6 +72,7 @@ if (USE_ROCM_TOOLKIT)
add_definitions("-DTENSORFLOW_USE_ROCM")
add_compile_definitions(__HIP_PLATFORM_HCC__)
message(STATUS "Found ROCM in ${ROCM_ROOT}, build AMD GPU support")
set(DP_VARIANT "rocm")
else()
message(STATUS "Will not build AMD GPU support")
endif (USE_ROCM_TOOLKIT)
Expand Down
7 changes: 7 additions & 0 deletions source/api_cc/src/DeepPot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ print_summary(const std::string &pre) const
std::cout << pre << "source commit at: " + global_git_date << std::endl;
std::cout << pre << "surpport model ver.:" + global_model_version << std::endl;
std::cout << pre << "build float prec: " + global_float_prec << std::endl;
#if defined(GOOGLE_CUDA)
std::cout << pre << "build variant: cuda" << std::endl;
#elif defined(TENSORFLOW_USE_ROCM)
std::cout << pre << "build variant: rocm" << std::endl;
#else
std::cout << pre << "build variant: cpu" << std::endl;
#endif
std::cout << pre << "build with tf inc: " + global_tf_include_dir << std::endl;
std::cout << pre << "build with tf lib: " + global_tf_lib << std::endl;
std::cout << pre << "set tf intra_op_parallelism_threads: " << num_intra_nthreads << std::endl;
Expand Down
1 change: 1 addition & 0 deletions source/config/run_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ TF_LIBS = @TensorFlow_LIBRARY@
TF_VERSION = @TENSORFLOW_VERSION@
TF_CXX11_ABI_FLAG = @OP_CXX_ABI@
MODEL_VERSION=@MODEL_VERSION@
DP_VARIANT=@DP_VARIANT@