From: 박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 Date: Mon, 26 Mar 2018 04:51:07 +0000 (+0900) Subject: Use shared library for LeNet example (#188) X-Git-Tag: 0.1~596 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61e3989a025c623818ccf2da5a46ae937736b6af;p=platform%2Fcore%2Fml%2Fnnfw.git Use shared library for LeNet example (#188) This commit revises 'external/acl.cmake' to use shared library (instead of static library) for LeNet example build. This allows users to run 'graph_lenet' example. Signed-off-by: Jonghyun Park --- diff --git a/externals/acl.cmake b/externals/acl.cmake index ed96b34..7de2034 100644 --- a/externals/acl.cmake +++ b/externals/acl.cmake @@ -22,6 +22,10 @@ target_link_libraries(acl_foundation dl pthread) ### file(GLOB ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/*.cpp") list(APPEND ACL_CORE_COMMON_SRCS "arm_compute_version.embed") +# Both CL & NEON runtime funtions use these CPP kernels +list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp") +list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.cpp") +list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPSortEuclideanDistanceKernel.cpp") add_library(acl_core_common ${ACL_CORE_COMMON_SRCS}) target_include_directories(acl_core_common PUBLIC "${ACL_GENERATED}") @@ -86,9 +90,6 @@ list(APPEND ACL_GRAPH_SRCS ${ACL_GRAPH_NEON_SRCS}) add_library(acl_graph ${ACL_GRAPH_SRCS}) target_link_libraries(acl_graph acl_runtime_opencl acl_runtime_neon) -add_executable(graph_lenet "${ACL_BASE}/examples/graph_lenet.cpp" "${ACL_BASE}/utils/Utils.cpp" "${ACL_BASE}/utils/GraphUtils.cpp") -target_link_libraries(graph_lenet acl_graph) - ### ### ARM Compute Shared Libraries ### @@ -108,7 +109,10 @@ list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_OPENCL_SRCS}) 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) +target_link_libraries(arm_compute arm_compute_core OpenCL) add_library(arm_compute_graph SHARED ${ACL_GRAPH_SRCS}) target_link_libraries(arm_compute_graph arm_compute) + +add_executable(graph_lenet "${ACL_BASE}/examples/graph_lenet.cpp" "${ACL_BASE}/utils/Utils.cpp" "${ACL_BASE}/utils/GraphUtils.cpp") +target_link_libraries(graph_lenet arm_compute_graph)