Install arm_compute_XXX and libnueralnetworks.so on pure_arm_compute … (#1393)
author이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 <chunseok.lee@samsung.com>
Tue, 29 May 2018 01:25:00 +0000 (10:25 +0900)
committer서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Tue, 29 May 2018 01:25:00 +0000 (10:25 +0900)
* 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 <chunseok.lee@samsung.com>
* Add option BUILD_PURE_ARM_COMPUTE and change install dir

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
* 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 <chunseok.lee@samsung.com>
* Apply suggestion

In summary,
1. install arm_compute_xxx to lib
2. install libnn.so to lib/pureacl

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
CMakeLists.txt
externals/acl.cmake
runtimes/pure_arm_compute/CMakeLists.txt

index 97e8460..0140888 100644 (file)
@@ -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)
index 206ada6..f091e63 100644 (file)
@@ -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)
index 2939499..4592b85 100644 (file)
@@ -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)