diff --git a/lite/CMakeLists.txt b/lite/CMakeLists.txt index 4597dd6219e51dc3ed054fc5b47844b32457c961..7af4c6953af745b7f20435df1070763bb69e115a 100644 --- a/lite/CMakeLists.txt +++ b/lite/CMakeLists.txt @@ -91,7 +91,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) COMMAND ${CMAKE_STRIP} "--strip-debug" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/*.a) endif() else() - if (IOS OR (ARM_TARGET_OS STREQUAL "armlinux")) + if (IOS) add_custom_target(tiny_publish_lib ${TARGET} COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include" @@ -107,7 +107,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/cxx/lib" COMMAND cp "${CMAKE_SOURCE_DIR}/lite/api/paddle_*.h" "${INFER_LITE_PUBLISH_ROOT}/cxx/include" COMMAND cp "${CMAKE_BINARY_DIR}/lite/api/libpaddle_light_api_shared.so" "${INFER_LITE_PUBLISH_ROOT}/cxx/lib" - ) + ) add_dependencies(tiny_publish_cxx_lib paddle_light_api_shared) add_dependencies(publish_inference tiny_publish_cxx_lib) endif() diff --git a/lite/api/CMakeLists.txt b/lite/api/CMakeLists.txt index 53f6f1b67160dd5d7f2dfc69bc4ef18ddcd0745b..d6d0532d7e99e52d47e1f2fc77d3b64a2dc88b32 100644 --- a/lite/api/CMakeLists.txt +++ b/lite/api/CMakeLists.txt @@ -31,11 +31,10 @@ if (NOT LITE_ON_TINY_PUBLISH) ARM_DEPS ${arm_kernels} NPU_DEPS ${npu_kernels}) target_link_libraries(paddle_light_api_shared ${light_lib_DEPS} ${arm_kernels} ${npu_kernels}) else() -# if (ARM_TARGET_OS STREQUAL "android") + add_library(paddle_light_api_shared SHARED "") target_sources(paddle_light_api_shared PUBLIC ${__lite_cc_files} paddle_api.cc light_api.cc light_api_impl.cc) add_dependencies(paddle_light_api_shared op_list_h kernel_list_h) -# endif() endif() if (WITH_TESTING) diff --git a/lite/tools/cmake_tools/create_fake_kernel_registry.py b/lite/tools/cmake_tools/create_fake_kernel_registry.py index 7031c8d18b91361dad664e297a47b9bb54f50bb9..9edd6d836d9c4eddbc3f9e4c1f78274abdf3b4c2 100644 --- a/lite/tools/cmake_tools/create_fake_kernel_registry.py +++ b/lite/tools/cmake_tools/create_fake_kernel_registry.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import print_function import sys import logging from ast import RegisterLiteKernelParser @@ -51,7 +52,7 @@ class %s : public KernelLite { with open(ops_list_path) as f: paths = set([path for path in f]) for path in paths: - print 'path', path + print('path', path) with open(path.strip()) as g: c = g.read() kernel_parser = RegisterLiteKernelParser(c)