From 61e3989a025c623818ccf2da5a46ae937736b6af Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=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: Mon, 26 Mar 2018 13:51:07 +0900 Subject: [PATCH] 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 --- externals/acl.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) -- 2.7.4