From f3103e9fd1eaf1aa23f1933461f0e36562404505 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 18:51:29 +0900 Subject: [PATCH] Revise acl cl backend cmake (#6391) - Set strict build option: nnfw_common - Remove needless link - Update header include for acl common Signed-off-by: Hyeongseok Oh --- runtimes/neurun/backend/acl_cl/CMakeLists.txt | 12 ++++-------- runtimes/neurun/backend/acl_cl/KernelGenerator.cc | 7 ++++--- runtimes/neurun/backend/acl_cl/MemoryManager.h | 4 ++-- runtimes/neurun/backend/acl_cl/ShapeFixer.cc | 7 ++++--- runtimes/neurun/backend/acl_cl/TensorBuilder.h | 3 ++- runtimes/neurun/backend/acl_cl/kernel/ConcatLayer.cc | 3 ++- runtimes/neurun/backend/acl_cl/operand/CLTensor.cc | 5 +++-- runtimes/neurun/backend/acl_cl/operand/ICLTensor.h | 3 ++- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/runtimes/neurun/backend/acl_cl/CMakeLists.txt b/runtimes/neurun/backend/acl_cl/CMakeLists.txt index 2dd7959..46d90b8 100644 --- a/runtimes/neurun/backend/acl_cl/CMakeLists.txt +++ b/runtimes/neurun/backend/acl_cl/CMakeLists.txt @@ -11,14 +11,10 @@ file(GLOB_RECURSE SOURCES "*.cc") add_library(${LIB_NEURUN_BACKEND_ACL_CL} SHARED ${SOURCES}) target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) - -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute_ex) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} neurun-core) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} ${LIB_NEURUN_BACKEND_ACL_COMMON}) - -target_compile_options(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE -Wall -Wextra -Werror) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE neurun-core) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE ${LIB_NEURUN_BACKEND_ACL_COMMON}) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE nnfw_common) set_target_properties(${LIB_NEURUN_BACKEND_ACL_CL} PROPERTIES OUTPUT_NAME backend_acl_cl) + install(TARGETS ${LIB_NEURUN_BACKEND_ACL_CL} DESTINATION lib) diff --git a/runtimes/neurun/backend/acl_cl/KernelGenerator.cc b/runtimes/neurun/backend/acl_cl/KernelGenerator.cc index 0eed6a2..41d0ef8 100644 --- a/runtimes/neurun/backend/acl_cl/KernelGenerator.cc +++ b/runtimes/neurun/backend/acl_cl/KernelGenerator.cc @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include "kernel/ConcatLayer.h" #include "model/Index.h" #include "model/DataType.h" @@ -30,9 +34,6 @@ #include "util/logging.h" #include "util/Utils.h" #include "util/Padding.h" -#include "acl_common/AclFunction.h" -#include "acl_common/Convert.h" -#include "acl_common/Swizzle.h" using ::neurun::compiler::IExecutionBuilder; diff --git a/runtimes/neurun/backend/acl_cl/MemoryManager.h b/runtimes/neurun/backend/acl_cl/MemoryManager.h index 540c1db..65338c2 100644 --- a/runtimes/neurun/backend/acl_cl/MemoryManager.h +++ b/runtimes/neurun/backend/acl_cl/MemoryManager.h @@ -23,8 +23,8 @@ #include #include -#include "acl_common/AclMemoryManager.h" -#include "acl_common/AclLinearMemoryManager.h" +#include +#include #include "operand/CLTensor.h" #include "operand/CLSubTensor.h" diff --git a/runtimes/neurun/backend/acl_cl/ShapeFixer.cc b/runtimes/neurun/backend/acl_cl/ShapeFixer.cc index 5fb2b21..e6744cc 100644 --- a/runtimes/neurun/backend/acl_cl/ShapeFixer.cc +++ b/runtimes/neurun/backend/acl_cl/ShapeFixer.cc @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include "kernel/ConcatLayer.h" #include "model/Index.h" #include "model/DataType.h" @@ -30,9 +34,6 @@ #include "util/logging.h" #include "util/Utils.h" #include "util/Padding.h" -#include "acl_common/AclFunction.h" -#include "acl_common/Convert.h" -#include "acl_common/Swizzle.h" using ::neurun::compiler::IExecutionBuilder; diff --git a/runtimes/neurun/backend/acl_cl/TensorBuilder.h b/runtimes/neurun/backend/acl_cl/TensorBuilder.h index 160b39a..8ce69a6 100644 --- a/runtimes/neurun/backend/acl_cl/TensorBuilder.h +++ b/runtimes/neurun/backend/acl_cl/TensorBuilder.h @@ -17,7 +17,8 @@ #ifndef __NEURUN_BACKEND_ACL_CL_TENSOR_BUILDER_H__ #define __NEURUN_BACKEND_ACL_CL_TENSOR_BUILDER_H__ -#include "acl_common/TemplTensorBuilder.h" +#include + #include "operand/CLTensor.h" #include "operand/CLSubTensor.h" #include "operand/Object.h" diff --git a/runtimes/neurun/backend/acl_cl/kernel/ConcatLayer.cc b/runtimes/neurun/backend/acl_cl/kernel/ConcatLayer.cc index 04388ce..bbe97c5 100644 --- a/runtimes/neurun/backend/acl_cl/kernel/ConcatLayer.cc +++ b/runtimes/neurun/backend/acl_cl/kernel/ConcatLayer.cc @@ -18,8 +18,9 @@ #include +#include + #include "util/feature/nchw/View.h" -#include "acl_common/Swizzle.h" #include "util/logging.h" namespace diff --git a/runtimes/neurun/backend/acl_cl/operand/CLTensor.cc b/runtimes/neurun/backend/acl_cl/operand/CLTensor.cc index 64bc4a1..4c78d31 100644 --- a/runtimes/neurun/backend/acl_cl/operand/CLTensor.cc +++ b/runtimes/neurun/backend/acl_cl/operand/CLTensor.cc @@ -14,12 +14,13 @@ * limitations under the License. */ +#include "CLTensor.h" + #include #include #include -#include "CLTensor.h" -#include "acl_common/Convert.h" +#include namespace neurun { diff --git a/runtimes/neurun/backend/acl_cl/operand/ICLTensor.h b/runtimes/neurun/backend/acl_cl/operand/ICLTensor.h index 3c29bba..022cec6 100644 --- a/runtimes/neurun/backend/acl_cl/operand/ICLTensor.h +++ b/runtimes/neurun/backend/acl_cl/operand/ICLTensor.h @@ -18,7 +18,8 @@ #define __NEURUN_BACKEND_ACL_CL_OPERAND_I_CL_TENSOR_H__ #include -#include + +#include namespace neurun { -- 2.7.4