提交 e5a76c98 编写于 作者: Y Yan Chunwei 提交者: GitHub

leave tiny-publish out of third-party dependencies (#1853)

上级 6ba3869b
[submodule "third-party/gflags"]
path = third-party/gflags
url = https://github.com/gflags/gflags.git
[submodule "third-party/googletest"]
path = third-party/googletest
url = https://github.com/google/googletest.git
[submodule "third-party/protobuf-mobile"]
path = third-party/protobuf-mobile
url = https://github.com/tensor-tang/protobuf.git
[submodule "third-party/protobuf-host"]
path = third-party/protobuf-host
url = https://github.com/protocolbuffers/protobuf.git
...@@ -109,16 +109,15 @@ if (WITH_LITE AND LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) ...@@ -109,16 +109,15 @@ if (WITH_LITE AND LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
include(cross_compiling/postproject) include(cross_compiling/postproject)
include(cross_compiling/npu) # check and prepare NPU DDK include(cross_compiling/npu) # check and prepare NPU DDK
# We compile the mobile deployment library when LITE_ON_TINY_PUBLISH=ON
# So the following third party dependencies are not needed.
if (NOT LITE_ON_TINY_PUBLISH)
# include the necessary thirdparty dependencies # include the necessary thirdparty dependencies
include(external/gflags) # download, build, install gflags include(external/gflags) # download, build, install gflags
# LITE_WITH_LIGHT_WEIGHT_FRAMEWORK=ON will disable glog # LITE_WITH_LIGHT_WEIGHT_FRAMEWORK=ON will disable glog
# TODO(sangoly): refine WITH_LITE and LITE_WITH_LIGHT_WEIGHT_FRAMEWORK # TODO(sangoly): refine WITH_LITE and LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
#include(external/glog) # download, build, install glog
include(external/gtest) # download, build, install gtest include(external/gtest) # download, build, install gtest
include(ccache) # set ccache for compilation include(ccache) # set ccache for compilation
if (NOT LITE_ON_TINY_PUBLISH)
include(external/protobuf) # download, build, install protobuf include(external/protobuf) # download, build, install protobuf
endif() endif()
...@@ -134,6 +133,7 @@ if (WITH_LITE AND LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) ...@@ -134,6 +133,7 @@ if (WITH_LITE AND LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
add_subdirectory(lite) add_subdirectory(lite)
return() return()
endif() endif()
################################# End of mobile compile ##############################
set(WITH_MKLML ${WITH_MKL}) set(WITH_MKLML ${WITH_MKL})
if (NOT DEFINED WITH_MKLDNN) if (NOT DEFINED WITH_MKLDNN)
......
...@@ -51,7 +51,6 @@ Paddle Lite 借鉴了以下开源项目: ...@@ -51,7 +51,6 @@ Paddle Lite 借鉴了以下开源项目:
- [ARM compute library]((https://github.com/ARM-software/ComputeLibrary)) - [ARM compute library]((https://github.com/ARM-software/ComputeLibrary))
- [Anakin](https://github.com/PaddlePaddle/Anakin) ,Anakin对应底层的一些优化实现已被集成到Paddle Lite。Anakin作为PaddlePaddle组织下的一个高性能预测项目,极具前瞻性,对Paddle Lite有重要贡献。Anakin已和本项目实现整合。之后,Anakin不再升级。 - [Anakin](https://github.com/PaddlePaddle/Anakin) ,Anakin对应底层的一些优化实现已被集成到Paddle Lite。Anakin作为PaddlePaddle组织下的一个高性能预测项目,极具前瞻性,对Paddle Lite有重要贡献。Anakin已和本项目实现整合。之后,Anakin不再升级。
## 交流与反馈 ## 交流与反馈
* 欢迎您通过Github Issues来提交问题、报告与建议 * 欢迎您通过Github Issues来提交问题、报告与建议
* QQ群: 696965088 * QQ群: 696965088
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
INCLUDE(ExternalProject) INCLUDE(ExternalProject)
SET(GFLAGS_SOURCES_DIR ${THIRD_PARTY_PATH}/gflags) SET(GFLAGS_SOURCES_DIR ${CMAKE_SOURCE_DIR}/third-party/gflags)
SET(GFLAGS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gflags) SET(GFLAGS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gflags)
SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE) SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE)
IF(WIN32) IF(WIN32)
...@@ -37,9 +37,10 @@ SET(OPTIONAL_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" ...@@ -37,9 +37,10 @@ SET(OPTIONAL_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
ExternalProject_Add( ExternalProject_Add(
extern_gflags extern_gflags
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
GIT_REPOSITORY "https://github.com/gflags/gflags.git" GIT_REPOSITORY ""
GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a
PREFIX ${GFLAGS_SOURCES_DIR} SOURCE_DIR ${GFLAGS_SOURCES_DIR}
PREFIX ${GFLAGS_INCLUDE_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_ARGS -DBUILD_STATIC_LIBS=ON CMAKE_ARGS -DBUILD_STATIC_LIBS=ON
-DCMAKE_INSTALL_PREFIX=${GFLAGS_INSTALL_DIR} -DCMAKE_INSTALL_PREFIX=${GFLAGS_INSTALL_DIR}
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
#FIXME:(gongwb) Move brpc's gtest dependency. # the gtest is only used when WITH_TESTING=ON
IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC)) IF(WITH_TESTING)
IF(WITH_TESTING) IF(WITH_TESTING)
ENABLE_TESTING() ENABLE_TESTING()
ENDIF(WITH_TESTING) ENDIF(WITH_TESTING)
INCLUDE(ExternalProject) INCLUDE(ExternalProject)
SET(GTEST_SOURCES_DIR ${THIRD_PARTY_PATH}/gtest) SET(GTEST_SOURCES_DIR ${CMAKE_SOURCE_DIR}/third-party/googletest)
SET(GTEST_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gtest) SET(GTEST_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gtest)
SET(GTEST_INCLUDE_DIR "${GTEST_INSTALL_DIR}/include" CACHE PATH "gtest include directory." FORCE) SET(GTEST_INCLUDE_DIR "${GTEST_INSTALL_DIR}/include" CACHE PATH "gtest include directory." FORCE)
...@@ -56,9 +56,10 @@ IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC)) ...@@ -56,9 +56,10 @@ IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC))
extern_gtest extern_gtest
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
DEPENDS ${GTEST_DEPENDS} DEPENDS ${GTEST_DEPENDS}
GIT_REPOSITORY "https://github.com/google/googletest.git" GIT_REPOSITORY ""
SOURCE_DIR ${GTEST_SOURCES_DIR}
GIT_TAG "release-1.8.0" GIT_TAG "release-1.8.0"
PREFIX ${GTEST_SOURCES_DIR} PREFIX ${GTEST_INSTALL_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_ARGS ${CROSS_COMPILE_CMAKE_ARGS} CMAKE_ARGS ${CROSS_COMPILE_CMAKE_ARGS}
${OPTIONAL_ARGS} ${OPTIONAL_ARGS}
...@@ -82,4 +83,4 @@ IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC)) ...@@ -82,4 +83,4 @@ IF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC))
SET_PROPERTY(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${GTEST_MAIN_LIBRARIES}) SET_PROPERTY(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${GTEST_MAIN_LIBRARIES})
ADD_DEPENDENCIES(gtest_main extern_gtest) ADD_DEPENDENCIES(gtest_main extern_gtest)
ENDIF(WITH_TESTING OR (WITH_DISTRIBUTE AND NOT WITH_GRPC)) ENDIF()
...@@ -177,10 +177,12 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -177,10 +177,12 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
"${PROTOBUF_INSTALL_DIR}/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}" "${PROTOBUF_INSTALL_DIR}/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}"
PARENT_SCOPE) PARENT_SCOPE)
SET(PROTOBUF_REPO "https://github.com/protocolbuffers/protobuf.git") # https://github.com/protocolbuffers/protobuf.git
SET(PROTOBUF_REPO "")
SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546") SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546")
SET(OPTIONAL_CACHE_ARGS "") SET(OPTIONAL_CACHE_ARGS "")
SET(OPTIONAL_ARGS "") SET(OPTIONAL_ARGS "")
SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/protobuf-host")
IF(BUILD_FOR_HOST) IF(BUILD_FOR_HOST)
SET(OPTIONAL_ARGS SET(OPTIONAL_ARGS
...@@ -191,8 +193,10 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -191,8 +193,10 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
SET(OPTIONAL_CACHE_ARGS "-DZLIB_ROOT:STRING=${ZLIB_ROOT}") SET(OPTIONAL_CACHE_ARGS "-DZLIB_ROOT:STRING=${ZLIB_ROOT}")
ELSE() ELSE()
# protobuf have compile issue when use android stl c++_static # protobuf have compile issue when use android stl c++_static
SET(PROTOBUF_REPO "https://github.com/tensor-tang/protobuf.git") # https://github.com/tensor-tang/protobuf.git
SET(PROTOBUF_REPO "")
SET(PROTOBUF_TAG "mobile") SET(PROTOBUF_TAG "mobile")
SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/protobuf-mobile")
SET(OPTIONAL_ARGS "-Dprotobuf_WITH_ZLIB=OFF" SET(OPTIONAL_ARGS "-Dprotobuf_WITH_ZLIB=OFF"
${CROSS_COMPILE_CMAKE_ARGS} ${CROSS_COMPILE_CMAKE_ARGS}
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
...@@ -215,8 +219,9 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -215,8 +219,9 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
PREFIX ${PROTOBUF_SOURCES_DIR} PREFIX ${PROTOBUF_SOURCES_DIR}
SOURCE_SUBDIR cmake SOURCE_SUBDIR cmake
UPDATE_COMMAND "" UPDATE_COMMAND ""
GIT_REPOSITORY ${PROTOBUF_REPO} GIT_REPOSITORY ""
GIT_TAG ${PROTOBUF_TAG} GIT_TAG ${PROTOBUF_TAG}
SOURCE_DIR ${SOURCE_DIR}
CMAKE_ARGS CMAKE_ARGS
${OPTIONAL_ARGS} ${OPTIONAL_ARGS}
-Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_TESTS=OFF
...@@ -237,12 +242,12 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -237,12 +242,12 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
ExternalProject_Add( ExternalProject_Add(
${TARGET_NAME} ${TARGET_NAME}
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
PREFIX ${PROTOBUF_SOURCES_DIR} PREFIX ${SOURCE_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
GIT_REPOSITORY ${PROTOBUF_REPO} GIT_REPOSITORY ""
GIT_TAG ${PROTOBUF_TAG} GIT_TAG ${PROTOBUF_TAG}
CONFIGURE_COMMAND SOURCE_DIR ${SOURCE_DIR}
${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake CONFIGURE_COMMAND ${CMAKE_COMMAND} ${SOURCE_DIR}/cmake
${OPTIONAL_ARGS} ${OPTIONAL_ARGS}
-Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_TESTS=OFF
-DCMAKE_SKIP_RPATH=ON -DCMAKE_SKIP_RPATH=ON
......
...@@ -368,7 +368,7 @@ function(bundle_static_library tgt_name bundled_tgt_name fake_target) ...@@ -368,7 +368,7 @@ function(bundle_static_library tgt_name bundled_tgt_name fake_target)
set(bundled_tgt_full_name set(bundled_tgt_full_name
${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${bundled_tgt_name}${CMAKE_STATIC_LIBRARY_SUFFIX}) ${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${bundled_tgt_name}${CMAKE_STATIC_LIBRARY_SUFFIX})
message(STATUS "+++++ bundled_tgt_full_name: ${bundled_tgt_full_name}") #message(STATUS "bundled_tgt_full_name: ${bundled_tgt_full_name}")
if(NOT IOS) if(NOT IOS)
file(WRITE ${CMAKE_BINARY_DIR}/${bundled_tgt_name}.ar.in file(WRITE ${CMAKE_BINARY_DIR}/${bundled_tgt_name}.ar.in
......
...@@ -10,7 +10,6 @@ message(STATUS "LITE_WITH_FPGA:\t${LITE_WITH_FPGA}") ...@@ -10,7 +10,6 @@ message(STATUS "LITE_WITH_FPGA:\t${LITE_WITH_FPGA}")
message(STATUS "LITE_WITH_PROFILE:\t${LITE_WITH_PROFILE}") message(STATUS "LITE_WITH_PROFILE:\t${LITE_WITH_PROFILE}")
set(LITE_MODEL_DIR "${THIRD_PARTY_PATH}/install") set(LITE_MODEL_DIR "${THIRD_PARTY_PATH}/install")
set(LITE_ON_MOBILE ${LITE_WITH_LIGHT_WEIGHT_FRAMEWORK}) set(LITE_ON_MOBILE ${LITE_WITH_LIGHT_WEIGHT_FRAMEWORK})
add_subdirectory(utils) add_subdirectory(utils)
......
...@@ -128,7 +128,7 @@ if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND WITH_TESTING) ...@@ -128,7 +128,7 @@ if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND WITH_TESTING)
set_target_properties(test_mobilenetv2 PROPERTIES LINK_FLAGS "${LINK_FLAGS}") set_target_properties(test_mobilenetv2 PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
lite_cc_test(test_resnet50 SRCS resnet50_test.cc lite_cc_test(test_resnet50 SRCS resnet50_test.cc
DEPS ${lite_model_test_DEPS} DEPS ${lite_model_test_DEPS} paddle_api_light
CL_DEPS ${opencl_kernels} CL_DEPS ${opencl_kernels}
FPGA_DEPS ${fpga_kernels} FPGA_DEPS ${fpga_kernels}
ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/opencl ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/opencl
......
...@@ -39,7 +39,7 @@ class LightPredictorImpl : public PaddlePredictor { ...@@ -39,7 +39,7 @@ class LightPredictorImpl : public PaddlePredictor {
}; };
void LightPredictorImpl::Init(const MobileConfig& config) { void LightPredictorImpl::Init(const MobileConfig& config) {
// LightPredictor Only support NaiveBuffer backend in publish lib // LightPredictor Only support NaiveBuffer backend in publish lib
#ifdef LITE_WITH_ARM #ifdef LITE_WITH_ARM
lite::DeviceInfo::Init(); lite::DeviceInfo::Init();
lite::DeviceInfo::Global().SetRunMode(config.power_mode(), config.threads()); lite::DeviceInfo::Global().SetRunMode(config.power_mode(), config.threads());
......
...@@ -113,9 +113,14 @@ class LITE_API CxxConfig : public ConfigBase { ...@@ -113,9 +113,14 @@ class LITE_API CxxConfig : public ConfigBase {
class LITE_API MobileConfig : public ConfigBase { class LITE_API MobileConfig : public ConfigBase {
PowerMode mode_{LITE_POWER_HIGH}; PowerMode mode_{LITE_POWER_HIGH};
int threads_{1}; int threads_{1};
public:
MobileConfig(Place preferred_place=Place(TARGET(kARM), PRECISION(kFloat), DATALAYOUT(kNCHW)), public:
PowerMode mode=LITE_POWER_HIGH, int threads=1) : mode_(mode), threads_(threads) {} MobileConfig(Place preferred_place = Place(TARGET(kARM),
PRECISION(kFloat),
DATALAYOUT(kNCHW)),
PowerMode mode = LITE_POWER_HIGH,
int threads = 1)
: mode_(mode), threads_(threads) {}
void set_power_mode(PowerMode mode) { mode_ = mode; } void set_power_mode(PowerMode mode) { mode_ = mode; }
void set_threads(int threads) { threads_ = threads; } void set_threads(int threads) { threads_ = threads; }
......
...@@ -70,6 +70,7 @@ enum class DataLayoutType : int { ...@@ -70,6 +70,7 @@ enum class DataLayoutType : int {
kAny = 2, // any data layout kAny = 2, // any data layout
NUM = 4, // number of fields. NUM = 4, // number of fields.
}; };
typedef enum { typedef enum {
LITE_POWER_HIGH = 0, LITE_POWER_HIGH = 0,
LITE_POWER_LOW = 1, LITE_POWER_LOW = 1,
......
...@@ -27,8 +27,6 @@ namespace lite { ...@@ -27,8 +27,6 @@ namespace lite {
#ifdef LITE_WITH_ARM #ifdef LITE_WITH_ARM
TEST(ResNet18, test) { TEST(ResNet18, test) {
DeviceInfo::Init();
DeviceInfo::Global().SetRunMode(lite_api::LITE_POWER_HIGH, FLAGS_threads);
lite::Predictor predictor; lite::Predictor predictor;
std::vector<Place> valid_places({Place{TARGET(kHost), PRECISION(kFloat)}, std::vector<Place> valid_places({Place{TARGET(kHost), PRECISION(kFloat)},
Place{TARGET(kARM), PRECISION(kFloat)}}); Place{TARGET(kARM), PRECISION(kFloat)}});
......
...@@ -827,7 +827,7 @@ void DeviceInfo::RequestPowerHighMode(int thread_num) { ...@@ -827,7 +827,7 @@ void DeviceInfo::RequestPowerHighMode(int thread_num) {
int little_core_size = little_core_ids_.size(); int little_core_size = little_core_ids_.size();
active_ids_.clear(); active_ids_.clear();
if (big_core_size > 0) { if (big_core_size > 0) {
mode_ =lite_api::PowerMode::LITE_POWER_HIGH; mode_ = lite_api::PowerMode::LITE_POWER_HIGH;
if (thread_num > big_core_size) { if (thread_num > big_core_size) {
LOG(ERROR) << "Request thread num: " << thread_num LOG(ERROR) << "Request thread num: " << thread_num
<< ", exceed the big cores size: " << big_core_size << ", exceed the big cores size: " << big_core_size
...@@ -1031,7 +1031,8 @@ int DeviceInfo::Setup() { ...@@ -1031,7 +1031,8 @@ int DeviceInfo::Setup() {
} }
LOG(INFO) << "Total memory: " << mem_size_ << "KB"; LOG(INFO) << "Total memory: " << mem_size_ << "KB";
// set default run mode // set default run mode
SetRunMode(lite_api::PowerMode::LITE_POWER_NO_BIND, 1); // use single thread by default SetRunMode(lite_api::PowerMode::LITE_POWER_NO_BIND,
1); // use single thread by default
return 0; return 0;
} }
......
...@@ -31,4 +31,4 @@ if(LITE_WITH_NPU) ...@@ -31,4 +31,4 @@ if(LITE_WITH_NPU)
endif() endif()
set(subgraph_passes ${subgraph_passes} CACHE INTERNAL "subgraph_passes") set(subgraph_passes ${subgraph_passes} CACHE INTERNAL "subgraph_passes")
message(STATUS "+++++ subgraph_passes: ${subgraph_passes}") message(STATUS "----> subgraph_passes: ${subgraph_passes}")
if (LITE_WITH_X86) if (LITE_WITH_X86)
lite_cc_library(fluid_data_type SRCS data_type.cc DEPS framework_proto) lite_cc_library(fluid_data_type SRCS data_type.cc DEPS framework_proto eigen3)
# lite_cc_library(selected_rows SRCS selected_rows.cc) # lite_cc_library(selected_rows SRCS selected_rows.cc)
endif() endif()
...@@ -43,10 +43,10 @@ add_kernel(squeeze_compute_arm ARM basic SRCS squeeze_compute.cc DEPS ${lite_ker ...@@ -43,10 +43,10 @@ add_kernel(squeeze_compute_arm ARM basic SRCS squeeze_compute.cc DEPS ${lite_ker
add_kernel(expand_compute_arm ARM basic SRCS expand_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(expand_compute_arm ARM basic SRCS expand_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(reduce_max_compute_arm ARM basic SRCS reduce_max_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(reduce_max_compute_arm ARM basic SRCS reduce_max_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_expand_compute_arm ARM basic SRCS sequence_expand_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(sequence_expand_compute_arm ARM basic SRCS sequence_expand_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(im2sequence_compute_arm ARM basic SRCS im2sequence_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_pool_compute_arm ARM basic SRCS sequence_pool_compute.cc DEPS ${lite_kernel_deps} math_arm)
# for OCR specific # for OCR specific
add_kernel(im2sequence_compute_arm ARM extra SRCS im2sequence_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_pool_compute_arm ARM extra SRCS sequence_pool_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(gru_unit_compute_arm ARM extra SRCS gru_unit_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(gru_unit_compute_arm ARM extra SRCS gru_unit_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(gru_compute_arm ARM extra SRCS gru_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(gru_compute_arm ARM extra SRCS gru_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(beam_search_decode_compute_arm ARM extra SRCS beam_search_decode_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(beam_search_decode_compute_arm ARM extra SRCS beam_search_decode_compute.cc DEPS ${lite_kernel_deps} math_arm)
......
...@@ -58,9 +58,9 @@ add_operator(norm_op basic SRCS norm_op.cc DEPS ${op_DEPS}) ...@@ -58,9 +58,9 @@ add_operator(norm_op basic SRCS norm_op.cc DEPS ${op_DEPS})
add_operator(shape_op_lite basic SRCS shape_op.cc DEPS ${op_DEPS}) add_operator(shape_op_lite basic SRCS shape_op.cc DEPS ${op_DEPS})
add_operator(sequence_expand_op_lite basic SRCS sequence_expand_op.cc DEPS ${op_DEPS}) add_operator(sequence_expand_op_lite basic SRCS sequence_expand_op.cc DEPS ${op_DEPS})
add_operator(squeeze_op_lite basic SRCS squeeze_op.cc DEPS ${op_DEPS}) add_operator(squeeze_op_lite basic SRCS squeeze_op.cc DEPS ${op_DEPS})
add_operator(im2sequence_op basic SRCS im2sequence_op.cc DEPS ${op_DEPS})
# for OCR specific # for OCR specific
add_operator(im2sequence_op extra SRCS im2sequence_op.cc DEPS ${op_DEPS})
add_operator(while_op extra SRCS while_op.cc DEPS ${op_DEPS}) add_operator(while_op extra SRCS while_op.cc DEPS ${op_DEPS})
add_operator(lookup_table_op extra SRCS lookup_table_op.cc DEPS ${op_DEPS}) add_operator(lookup_table_op extra SRCS lookup_table_op.cc DEPS ${op_DEPS})
add_operator(beam_search_decode_op extra SRCS beam_search_decode_op.cc DEPS ${op_DEPS}) add_operator(beam_search_decode_op extra SRCS beam_search_decode_op.cc DEPS ${op_DEPS})
......
...@@ -58,6 +58,8 @@ function make_full_publish_so { ...@@ -58,6 +58,8 @@ function make_full_publish_so {
local lang=$3 local lang=$3
local android_stl=$4 local android_stl=$4
git submodule update --init --recursive
cur_dir=$(pwd) cur_dir=$(pwd)
build_dir=$cur_dir/build.lite.${os}.${abi}.${lang} build_dir=$cur_dir/build.lite.${os}.${abi}.${lang}
if [ -d $build_dir ] if [ -d $build_dir ]
...@@ -85,6 +87,7 @@ function make_all_tests { ...@@ -85,6 +87,7 @@ function make_all_tests {
local abi=$2 local abi=$2
local lang=$3 local lang=$3
git submodule update --init --recursive
cur_dir=$(pwd) cur_dir=$(pwd)
build_dir=$cur_dir/build.lite.${os}.${abi}.${lang} build_dir=$cur_dir/build.lite.${os}.${abi}.${lang}
if [ -d $build_dir ] if [ -d $build_dir ]
...@@ -106,6 +109,7 @@ function make_all_tests { ...@@ -106,6 +109,7 @@ function make_all_tests {
function print_usage { function print_usage {
set +x
echo -e "\nUSAGE:" echo -e "\nUSAGE:"
echo echo
echo "----------------------------------------" echo "----------------------------------------"
......
...@@ -22,6 +22,9 @@ function prepare_workspace { ...@@ -22,6 +22,9 @@ function prepare_workspace {
DEBUG_TOOL_PATH_PREFIX=lite/tools/debug DEBUG_TOOL_PATH_PREFIX=lite/tools/debug
mkdir -p ./${DEBUG_TOOL_PATH_PREFIX} mkdir -p ./${DEBUG_TOOL_PATH_PREFIX}
cp ../${DEBUG_TOOL_PATH_PREFIX}/analysis_tool.py ./${DEBUG_TOOL_PATH_PREFIX}/ cp ../${DEBUG_TOOL_PATH_PREFIX}/analysis_tool.py ./${DEBUG_TOOL_PATH_PREFIX}/
# clone submodule
git submodule update --init --recursive
} }
function check_need_ci { function check_need_ci {
......
...@@ -33,7 +33,8 @@ void Run(DebugConfig* conf) { ...@@ -33,7 +33,8 @@ void Run(DebugConfig* conf) {
CHECK(conf); CHECK(conf);
#ifdef LITE_WITH_ARM #ifdef LITE_WITH_ARM
DeviceInfo::Init(); DeviceInfo::Init();
DeviceInfo::Global().SetRunMode(lite_api::LITE_POWER_HIGH, conf->arm_thread_num); DeviceInfo::Global().SetRunMode(lite_api::LITE_POWER_HIGH,
conf->arm_thread_num);
#endif #endif
lite::Predictor predictor; lite::Predictor predictor;
std::vector<Place> valid_places({ std::vector<Place> valid_places({
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
*/ */
#pragma once #pragma once
#include <assert.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <assert.h>
#include "lite/utils/replace_stl/stream.h" #include "lite/utils/replace_stl/stream.h"
// NOLINTFILE() // NOLINTFILE()
......
...@@ -16,7 +16,7 @@ function(math_library TARGET) ...@@ -16,7 +16,7 @@ function(math_library TARGET)
endif() endif()
list(LENGTH cc_srcs cc_srcs_len) list(LENGTH cc_srcs cc_srcs_len)
lite_cc_library(${TARGET} SRCS ${cc_srcs} DEPS ${math_library_DEPS} ${math_common_deps}) lite_cc_library(${TARGET} SRCS ${cc_srcs} DEPS ${math_library_DEPS} ${math_common_deps} eigen3)
endfunction() endfunction()
# please add new math_library in alphabetical order # please add new math_library in alphabetical order
...@@ -32,7 +32,7 @@ math_library(sampler) ...@@ -32,7 +32,7 @@ math_library(sampler)
math_library(gru_compute DEPS activation_functions math_function) math_library(gru_compute DEPS activation_functions math_function)
## math_library(lstm_compute DEPS activation_functions) ## math_library(lstm_compute DEPS activation_functions)
lite_cc_library(blas SRCS blas.cc DEPS cblas framework_proto) lite_cc_library(blas SRCS blas.cc DEPS cblas framework_proto eigen3)
math_library(math_function DEPS blas) math_library(math_function DEPS blas)
math_library(maxouting) math_library(maxouting)
math_library(pooling) math_library(pooling)
......
Subproject commit 77592648e3f3be87d6c7123eb81cbad75f9aef5a
Subproject commit ec44c6c1675c25b9827aacd08c02433cccde7780
Subproject commit 9f75c5aa851cd877fb0d93ccc31b8567a6706546
Subproject commit 0bccaabfc6fda5b04d7460110ae075b7eebe9d2a
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册