提交 7e446198 编写于 作者: X Xiaoyang LI 提交者: Yan Chunwei

cherry-pick: Fix Mac & arm-linux build error (#2083)

上级 2a4eb485
......@@ -165,11 +165,13 @@ function(lite_cc_binary TARGET)
)
cc_binary(${TARGET} SRCS ${args_SRCS} DEPS ${deps} ${args_DEPS})
target_compile_options(${TARGET} BEFORE PRIVATE -Wno-ignored-qualifiers)
# strip binary target to reduce size
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND "${CMAKE_STRIP}" -s
"${TARGET}"
COMMENT "Strip debug symbols done on final executable file.")
if (NOT APPLE)
# strip binary target to reduce size
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND "${CMAKE_STRIP}" -s
"${TARGET}"
COMMENT "Strip debug symbols done on final executable file.")
endif()
# collect targets need to compile for lite
if (NOT args_EXCLUDE_COMPILE_DEPS)
add_dependencies(lite_compile_deps ${TARGET})
......
......@@ -198,6 +198,7 @@ inline void gemm_int8_kernel(const int8_t* a_ptr,
bool is_relu,
int k,
int rem);
// clang-format off
#ifdef __aarch64__
#define GEMM_INT8_KERNEL \
......
......@@ -4,10 +4,12 @@ endif()
configure_file(cupti_lib_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/cupti_lib_path.h)
configure_file(warpctc_lib_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/warpctc_lib_path.h)
lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc)
if (LITE_ON_MODEL_OPTIMIZE_TOOL)
return()
endif(LITE_ON_MODEL_OPTIMIZE_TOOL)
lite_cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags)
lite_cc_library(dynload_mklml SRCS mklml.cc DEPS dynamic_loader mklml)
lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc)
lite_cc_library(x86_cpu_info SRCS cpu_info.cc DEPS xbyak)
add_subdirectory(jit)
......
......@@ -13,6 +13,7 @@
// limitations under the License.
#include "lite/operators/range_op.h"
#include <cmath>
#include <functional>
#include "lite/core/op_registry.h"
......
......@@ -56,8 +56,12 @@ function build_model_optimize_tool {
prepare_thirdparty
mkdir -p build.model_optimize_tool
cd build.model_optimize_tool
cmake .. -DWITH_LITE=ON -DLITE_ON_MODEL_OPTIMIZE_TOOL=ON -DWITH_TESTING=OFF -DLITE_BUILD_EXTRA=ON
make model_optimize_tool -j$NUM_CORES_FOR_COMPILE
cmake .. -DWITH_LITE=ON \
-DLITE_ON_MODEL_OPTIMIZE_TOOL=ON \
-DWITH_TESTING=OFF \
-DLITE_BUILD_EXTRA=ON \
-DWITH_MKL=OFF
make model_optimize_tool -j$NUM_PROC
}
function make_tiny_publish_so {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册