From 7cea88bf18b1a31e495ed360907ab86215d8e2a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=95=9C=EC=A2=85/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Mon, 23 Jul 2018 17:51:18 +0900 Subject: [PATCH] [neurun] Extract acl_cl backend as a separate lib (#2055) Extract acl_cl backend as a separate lib. Note that kernel implementation still is included in neruun lib. Same for cpu backend is done with #2042. Signed-off-by: Hanjoung Lee --- runtimes/neurun/CMakeLists.txt | 3 +++ runtimes/neurun/src/backend/CMakeLists.txt | 1 + runtimes/neurun/src/backend/acl_cl/CMakeLists.txt | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 runtimes/neurun/src/backend/acl_cl/CMakeLists.txt diff --git a/runtimes/neurun/CMakeLists.txt b/runtimes/neurun/CMakeLists.txt index c61a110..aac3435 100644 --- a/runtimes/neurun/CMakeLists.txt +++ b/runtimes/neurun/CMakeLists.txt @@ -2,7 +2,9 @@ set(NEURUN_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) +# Build backends set(LIB_NEURUN_BACKEND_CPU neurun_backend_cpu) +set(LIB_NEURUN_BACKEND_ACL_CL neurun_backend_acl_cl) add_subdirectory(src/backend) file(GLOB SOURCES "src/*.cc") @@ -28,6 +30,7 @@ target_link_libraries(${LIB_NEURUN} nnfw_support_nnapi) # TODO This should be optional target_link_libraries(${LIB_NEURUN} ${LIB_NEURUN_BACKEND_CPU}) +target_link_libraries(${LIB_NEURUN} ${LIB_NEURUN_BACKEND_ACL_CL}) set_target_properties(${LIB_NEURUN} PROPERTIES OUTPUT_NAME neuralnetworks) diff --git a/runtimes/neurun/src/backend/CMakeLists.txt b/runtimes/neurun/src/backend/CMakeLists.txt index 9f4db84..a398231 100644 --- a/runtimes/neurun/src/backend/CMakeLists.txt +++ b/runtimes/neurun/src/backend/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(cpu) +add_subdirectory(acl_cl) diff --git a/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt b/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt new file mode 100644 index 0000000..614e9f1 --- /dev/null +++ b/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt @@ -0,0 +1,13 @@ +file(GLOB SOURCES "*.cc") + +add_library(${LIB_NEURUN_BACKEND_ACL_CL} SHARED ${SOURCES}) + +target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${NNFW_INCLUDE_DIR}) +target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${NEURUN_INCLUDE_DIR}) +target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${CMAKE_SOURCE_DIR}/externals/tensorflow) # TODO Remove this file. We should not need this. + +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} nnfw_support_nnapi) + +set_target_properties(${LIB_NEURUN_BACKEND_ACL_CL} PROPERTIES OUTPUT_NAME backend_acl_cl) +install(TARGETS ${LIB_NEURUN_BACKEND_ACL_CL} DESTINATION lib/new_runtime) -- 2.7.4