提交 0aa8881a 编写于 作者: 石晓伟 提交者: GitHub

fix cmake flaws, test=develop (#2468)

上级 62044067
...@@ -34,8 +34,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS ...@@ -34,8 +34,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS
/usr/lib /usr/lib
${CUDA_TOOLKIT_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR}
${CUDA_TOOLKIT_ROOT_DIR}/lib/x64 ${CUDA_TOOLKIT_ROOT_DIR}/lib/x64
${CUDA_TOOLKIT_ROOT_DIR}/lib64 ${CUDA_TOOLKIT_ROOT_DIR}/lib64)
)
if((${CUDA_VERSION} GREATER 10.0) OR (${CUDA_VERSION} EQUAL 10.0)) if((${CUDA_VERSION} GREATER 10.0) OR (${CUDA_VERSION} EQUAL 10.0))
find_library(CUBLAS_LIBRARY NAMES libcublas.so PATHS ${CUDNN_CHECK_LIBRARY_DIRS} NO_DEFAULT_PATH) find_library(CUBLAS_LIBRARY NAMES libcublas.so PATHS ${CUDNN_CHECK_LIBRARY_DIRS} NO_DEFAULT_PATH)
......
lite_cc_library(debug_utils SRCS debug_utils.cc DEPS op_params model_parser) if(NOT LITE_ON_MODEL_OPTIMIZE_TOOL)
return()
endif()
if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_ON_MODEL_OPTIMIZE_TOOL) lite_cc_library(debug_utils SRCS debug_utils.cc DEPS op_params model_parser)
lite_cc_binary(lite_model_debug_tool SRCS model_debug_tool.cc lite_cc_binary(lite_model_debug_tool SRCS model_debug_tool.cc
DEPS DEPS
cxx_api cxx_api
debug_utils debug_utils
...@@ -16,4 +18,3 @@ if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_ON_MODEL_OPTIMIZE_TOOL) ...@@ -16,4 +18,3 @@ if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_ON_MODEL_OPTIMIZE_TOOL)
XPU_DEPS ${xpu_kernels} XPU_DEPS ${xpu_kernels}
FPGA_DEPS ${fpga_kernels} FPGA_DEPS ${fpga_kernels}
CL_DEPS ${opencl_kernels}) CL_DEPS ${opencl_kernels})
endif()
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "lite/model_parser/pb/var_desc.h" #include "lite/model_parser/pb/var_desc.h"
#include "lite/utils/all.h" #include "lite/utils/all.h"
DEFINE_string(model_path, "", "Model dir path"); DEFINE_string(model_dir, "", "Model dir path");
DEFINE_string(input_file, "", "Input datas file path"); DEFINE_string(input_file, "", "Input datas file path");
DEFINE_string(topo_output_file, "", "Runtime topology order output file path"); DEFINE_string(topo_output_file, "", "Runtime topology order output file path");
DEFINE_bool(output_topo, true, "Dump runtime topology or not"); DEFINE_bool(output_topo, true, "Dump runtime topology or not");
...@@ -185,7 +185,7 @@ void ParseConfig(DebugConfig* conf) { ...@@ -185,7 +185,7 @@ void ParseConfig(DebugConfig* conf) {
CHECK(conf); CHECK(conf);
#define CHECK_NON_EMPTY(name__) \ #define CHECK_NON_EMPTY(name__) \
CHECK(!FLAGS_##name__.empty()) << "Option " << #name__ << " can't be empty." CHECK(!FLAGS_##name__.empty()) << "Option " << #name__ << " can't be empty."
CHECK_NON_EMPTY(model_path); CHECK_NON_EMPTY(model_dir);
if (FLAGS_output_topo) { if (FLAGS_output_topo) {
CHECK_NON_EMPTY(topo_output_file); CHECK_NON_EMPTY(topo_output_file);
} }
...@@ -193,7 +193,7 @@ void ParseConfig(DebugConfig* conf) { ...@@ -193,7 +193,7 @@ void ParseConfig(DebugConfig* conf) {
CHECK_NON_EMPTY(tensor_output_file); CHECK_NON_EMPTY(tensor_output_file);
} }
#undef CHECK_NON_EMPTY #undef CHECK_NON_EMPTY
conf->model_dir = FLAGS_model_path; conf->model_dir = FLAGS_model_dir;
conf->topo_output_file = FLAGS_topo_output_file; conf->topo_output_file = FLAGS_topo_output_file;
conf->tensor_output_file = FLAGS_tensor_output_file; conf->tensor_output_file = FLAGS_tensor_output_file;
conf->input_file = FLAGS_input_file; conf->input_file = FLAGS_input_file;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册