[neurun] Extract acl_cl backend as a separate lib (#2055)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Mon, 23 Jul 2018 08:51:18 +0000 (17:51 +0900)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 23 Jul 2018 08:51:18 +0000 (17:51 +0900)
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 <hanjoung.lee@samsung.com>
runtimes/neurun/CMakeLists.txt
runtimes/neurun/src/backend/CMakeLists.txt
runtimes/neurun/src/backend/acl_cl/CMakeLists.txt [new file with mode: 0644]

index c61a110..aac3435 100644 (file)
@@ -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/acl_cl/CMakeLists.txt b/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt
new file mode 100644 (file)
index 0000000..614e9f1
--- /dev/null
@@ -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)