From: 이한종/동작제어Lab(SR)/Engineer/삼성전자 Date: Mon, 23 Jul 2018 08:51:18 +0000 (+0900) Subject: [neurun] Extract acl_cl backend as a separate lib (#2055) X-Git-Tag: 0.2~410 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cea88bf18b1a31e495ed360907ab86215d8e2a2;p=platform%2Fcore%2Fml%2Fnnfw.git [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 --- 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)