From 28ac548ffbde237ef9b9482f0cefa7a60ffcd768 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 8 Aug 2019 17:46:19 +0900 Subject: [PATCH] Revise acl neon backend cmake (#6393) - Set strict build option: nnfw_common - Remove needless link - Update header include for acl common Signed-off-by: Hyeongseok Oh --- runtimes/neurun/backend/acl_neon/CMakeLists.txt | 15 ++++----------- runtimes/neurun/backend/acl_neon/KernelGenerator.cc | 5 +++-- runtimes/neurun/backend/acl_neon/MemoryManager.h | 4 ++-- runtimes/neurun/backend/acl_neon/ShapeFixer.cc | 5 +++-- runtimes/neurun/backend/acl_neon/TensorBuilder.h | 3 ++- runtimes/neurun/backend/acl_neon/kernel/ConcatLayer.cc | 3 ++- runtimes/neurun/backend/acl_neon/operand/INETensor.h | 3 ++- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/runtimes/neurun/backend/acl_neon/CMakeLists.txt b/runtimes/neurun/backend/acl_neon/CMakeLists.txt index 0ffcc6b..3fb66a0 100644 --- a/runtimes/neurun/backend/acl_neon/CMakeLists.txt +++ b/runtimes/neurun/backend/acl_neon/CMakeLists.txt @@ -10,18 +10,11 @@ file(GLOB_RECURSE SOURCES "*.cc") add_library(${LIB_NEURUN_BACKEND_ACL_NEON} SHARED ${SOURCES}) -target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PUBLIC ${NEURUN_INCLUDE_DIR}) target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -#following line it to reuse codes of other backends -target_include_directories(${LIB_NEURUN_BACKEND_ACL_NEON} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) - -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} arm_compute) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} arm_compute_ex) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} neurun-core) - -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} ${LIB_NEURUN_BACKEND_ACL_COMMON}) - -target_compile_options(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE -Wall -Wextra -Werror) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE neurun-core) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE ${LIB_NEURUN_BACKEND_ACL_COMMON}) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_NEON} PRIVATE nnfw_common) set_target_properties(${LIB_NEURUN_BACKEND_ACL_NEON} PROPERTIES OUTPUT_NAME backend_acl_neon) + install(TARGETS ${LIB_NEURUN_BACKEND_ACL_NEON} DESTINATION lib) diff --git a/runtimes/neurun/backend/acl_neon/KernelGenerator.cc b/runtimes/neurun/backend/acl_neon/KernelGenerator.cc index 72be6bd..0b14e41 100644 --- a/runtimes/neurun/backend/acl_neon/KernelGenerator.cc +++ b/runtimes/neurun/backend/acl_neon/KernelGenerator.cc @@ -33,6 +33,9 @@ #include #include +#include +#include + #include "kernel/ConcatLayer.h" #include "util/Padding.h" #include "model/Index.h" @@ -42,8 +45,6 @@ #include "exec/NopFunction.h" #include "util/logging.h" #include "util/Utils.h" -#include "acl_common/Convert.h" -#include "acl_common/Swizzle.h" using ::neurun::compiler::IExecutionBuilder; diff --git a/runtimes/neurun/backend/acl_neon/MemoryManager.h b/runtimes/neurun/backend/acl_neon/MemoryManager.h index f6d2689..b47cd66 100644 --- a/runtimes/neurun/backend/acl_neon/MemoryManager.h +++ b/runtimes/neurun/backend/acl_neon/MemoryManager.h @@ -23,8 +23,8 @@ #include #include -#include "acl_common/AclMemoryManager.h" -#include "acl_common/AclLinearMemoryManager.h" +#include +#include #include "operand/NETensor.h" #include "operand/NESubTensor.h" diff --git a/runtimes/neurun/backend/acl_neon/ShapeFixer.cc b/runtimes/neurun/backend/acl_neon/ShapeFixer.cc index 5eda1167..e6fdca7 100644 --- a/runtimes/neurun/backend/acl_neon/ShapeFixer.cc +++ b/runtimes/neurun/backend/acl_neon/ShapeFixer.cc @@ -28,6 +28,9 @@ #include #include +#include +#include + #include "kernel/ConcatLayer.h" #include "util/Padding.h" #include "model/Index.h" @@ -37,8 +40,6 @@ #include "exec/NopFunction.h" #include "util/logging.h" #include "util/Utils.h" -#include "acl_common/Convert.h" -#include "acl_common/Swizzle.h" using ::neurun::compiler::IExecutionBuilder; diff --git a/runtimes/neurun/backend/acl_neon/TensorBuilder.h b/runtimes/neurun/backend/acl_neon/TensorBuilder.h index b01971e..3da30df 100644 --- a/runtimes/neurun/backend/acl_neon/TensorBuilder.h +++ b/runtimes/neurun/backend/acl_neon/TensorBuilder.h @@ -17,9 +17,10 @@ #ifndef __NEURUN_BACKEND_ACL_NEON_TENSOR_BUILDER_H__ #define __NEURUN_BACKEND_ACL_NEON_TENSOR_BUILDER_H__ +#include + #include -#include "acl_common/TemplTensorBuilder.h" #include "operand/NETensor.h" #include "operand/NESubTensor.h" diff --git a/runtimes/neurun/backend/acl_neon/kernel/ConcatLayer.cc b/runtimes/neurun/backend/acl_neon/kernel/ConcatLayer.cc index 49ffa7b..d321fec 100644 --- a/runtimes/neurun/backend/acl_neon/kernel/ConcatLayer.cc +++ b/runtimes/neurun/backend/acl_neon/kernel/ConcatLayer.cc @@ -16,8 +16,9 @@ #include "ConcatLayer.h" +#include + #include "util/feature/nchw/View.h" -#include "acl_common/Swizzle.h" #include "util/logging.h" namespace diff --git a/runtimes/neurun/backend/acl_neon/operand/INETensor.h b/runtimes/neurun/backend/acl_neon/operand/INETensor.h index 23e802d..256806a 100644 --- a/runtimes/neurun/backend/acl_neon/operand/INETensor.h +++ b/runtimes/neurun/backend/acl_neon/operand/INETensor.h @@ -18,7 +18,8 @@ #define __NEURUN_BACKEND_ACL_NEON_OPERAND_I_NE_TENSOR_H__ #include -#include + +#include namespace neurun { -- 2.7.4