From 3198f52e5c00b8129e93b3c3ad29e16d278777fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Senior=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Tue, 29 May 2018 10:25:00 +0900 Subject: [PATCH] =?utf8?q?Install=20arm=5Fcompute=5FXXX=20and=20libnueraln?= =?utf8?q?etworks.so=20on=20pure=5Farm=5Fcompute=20=E2=80=A6=20(#1393)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Install arm_compute_XXX and libnueralnetworks.so on pure_arm_compute build 1. On pure_arm_compute runtime build, install arm_compute_XXX.so into lib 2. DO NOT build NN Runtime if BUILD_ACL=ON Signed-off-by: Chunseok Lee * Add option BUILD_PURE_ARM_COMPUTE and change install dir Signed-off-by: Chunseok Lee * Remove `BUILD_NN_RUNTIME` option off Since pure_acl_compute runtime is installed to lib/pureacl, we do not need turn off option BUILD_NN_RUNTIME. Signed-off-by: Chunseok Lee * Apply suggestion In summary, 1. install arm_compute_xxx to lib 2. install libnn.so to lib/pureacl Signed-off-by: Chunseok Lee --- CMakeLists.txt | 1 + externals/acl.cmake | 3 +++ runtimes/pure_arm_compute/CMakeLists.txt | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97e8460..0140888 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,7 @@ endforeach() # Configuration flags # option(BUILD_ACL "Build ARM Compute Library" OFF) +option(BUILD_PURE_ARM_COMPUTE "Build pure_arm_compute runtime" OFF) option(BUILD_ACL_STATIC_LIB "Build ARM Comput Static Library" OFF) option(BUILD_BENCHMARK_ACL "Build ARM Compute Library Benchmarks" OFF) option(BUILD_NN_RUNTIME "Build NN Runtime" ON) diff --git a/externals/acl.cmake b/externals/acl.cmake index 206ada6..f091e63 100644 --- a/externals/acl.cmake +++ b/externals/acl.cmake @@ -122,6 +122,7 @@ target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}") target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}/include") target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}/arm_compute/core/NEON/kernels/assembly") target_link_libraries(arm_compute_core dl pthread) +install(TARGETS arm_compute_core DESTINATION lib) list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_COMMON_SRCS}) list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_OPENCL_SRCS}) @@ -129,9 +130,11 @@ list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_NEON_SRCS}) add_library(arm_compute SHARED ${ACL_RUNTIME_SRCS}) target_link_libraries(arm_compute arm_compute_core OpenCL) +install(TARGETS arm_compute DESTINATION lib) add_library(arm_compute_graph SHARED ${ACL_GRAPH_SRCS}) target_link_libraries(arm_compute_graph arm_compute) +install(TARGETS arm_compute_graph DESTINATION lib) add_library(arm_compute_test SHARED "${ACL_BASE}/utils/Utils.cpp") target_link_libraries(arm_compute_test arm_compute) diff --git a/runtimes/pure_arm_compute/CMakeLists.txt b/runtimes/pure_arm_compute/CMakeLists.txt index 2939499..4592b85 100644 --- a/runtimes/pure_arm_compute/CMakeLists.txt +++ b/runtimes/pure_arm_compute/CMakeLists.txt @@ -1,4 +1,4 @@ -if(TARGET arm_compute) +if(BUILD_PURE_ARM_COMPUTE) file(GLOB_RECURSE SOURCES "src/*.cc") add_library(nnapi_pure_arm_compute SHARED ${SOURCES}) @@ -7,4 +7,5 @@ if(TARGET arm_compute) target_link_libraries(nnapi_pure_arm_compute arm_compute) target_link_libraries(nnapi_pure_arm_compute nnfw_util) set_target_properties(nnapi_pure_arm_compute PROPERTIES OUTPUT_NAME neuralnetworks) -endif(TARGET arm_compute) + install(TARGETS nnapi_pure_arm_compute DESTINATION lib/pureacl RENAME neuralnetworks) +endif(BUILD_PURE_ARM_COMPUTE) -- 2.7.4