提交 2e40b2f7 编写于 作者: J juncaipeng

Merge branch 'gpu' of https://github.com/yongqiangma/Paddle-Lite into gpu

...@@ -91,7 +91,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) ...@@ -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) COMMAND ${CMAKE_STRIP} "--strip-debug" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/*.a)
endif() endif()
else() else()
if (IOS OR (ARM_TARGET_OS STREQUAL "armlinux")) if (IOS)
add_custom_target(tiny_publish_lib ${TARGET} add_custom_target(tiny_publish_lib ${TARGET}
COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib"
COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include"
...@@ -107,7 +107,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) ...@@ -107,7 +107,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/cxx/lib" 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_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" 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(tiny_publish_cxx_lib paddle_light_api_shared)
add_dependencies(publish_inference tiny_publish_cxx_lib) add_dependencies(publish_inference tiny_publish_cxx_lib)
endif() endif()
......
...@@ -31,11 +31,10 @@ if (NOT LITE_ON_TINY_PUBLISH) ...@@ -31,11 +31,10 @@ if (NOT LITE_ON_TINY_PUBLISH)
ARM_DEPS ${arm_kernels} NPU_DEPS ${npu_kernels}) ARM_DEPS ${arm_kernels} NPU_DEPS ${npu_kernels})
target_link_libraries(paddle_light_api_shared ${light_lib_DEPS} ${arm_kernels} ${npu_kernels}) target_link_libraries(paddle_light_api_shared ${light_lib_DEPS} ${arm_kernels} ${npu_kernels})
else() else()
# if (ARM_TARGET_OS STREQUAL "android")
add_library(paddle_light_api_shared SHARED "") 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) 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) add_dependencies(paddle_light_api_shared op_list_h kernel_list_h)
# endif()
endif() endif()
if (WITH_TESTING) if (WITH_TESTING)
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
# 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.
from __future__ import print_function
import sys import sys
import logging import logging
from ast import RegisterLiteKernelParser from ast import RegisterLiteKernelParser
...@@ -51,7 +52,7 @@ class %s : public KernelLite<TARGET(%s), PRECISION(%s), DATALAYOUT(%s)> { ...@@ -51,7 +52,7 @@ class %s : public KernelLite<TARGET(%s), PRECISION(%s), DATALAYOUT(%s)> {
with open(ops_list_path) as f: with open(ops_list_path) as f:
paths = set([path for path in f]) paths = set([path for path in f])
for path in paths: for path in paths:
print 'path', path print('path', path)
with open(path.strip()) as g: with open(path.strip()) as g:
c = g.read() c = g.read()
kernel_parser = RegisterLiteKernelParser(c) kernel_parser = RegisterLiteKernelParser(c)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册