From 4773ee9726f12ca738e4b6d133fb4349673fd1d2 Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Thu, 19 Sep 2024 10:31:22 +0900 Subject: [PATCH] [onert] Remove backend layout helper (#14019) This commit removes unused backend layout helper functions. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh --- runtime/onert/backend/acl_common/Convert.cc | 13 ------------- runtime/onert/backend/acl_common/Convert.h | 1 - runtime/onert/backend/trix/Convert.cc | 13 ------------- runtime/onert/backend/trix/Convert.h | 8 -------- 4 files changed, 35 deletions(-) diff --git a/runtime/onert/backend/acl_common/Convert.cc b/runtime/onert/backend/acl_common/Convert.cc index eb11fcf2385..f0904a685d9 100644 --- a/runtime/onert/backend/acl_common/Convert.cc +++ b/runtime/onert/backend/acl_common/Convert.cc @@ -252,19 +252,6 @@ std::unique_ptr asAclFunction(std::unique_ptr<::arm_compute::IFunct return std::make_unique(std::move(layer)); } -ir::Layout asRuntimeLayout(::arm_compute::DataLayout data_layout) -{ - switch (data_layout) - { - case ::arm_compute::DataLayout::NHWC: - return ir::Layout::NHWC; - case ::arm_compute::DataLayout::NCHW: - return ir::Layout::NCHW; - default: - return ir::Layout::UNKNOWN; - } -} - ir::DataType asRuntimeDataType(::arm_compute::DataType data_type) { switch (data_type) diff --git a/runtime/onert/backend/acl_common/Convert.h b/runtime/onert/backend/acl_common/Convert.h index dd6ce59183f..6dd8d01ab06 100644 --- a/runtime/onert/backend/acl_common/Convert.h +++ b/runtime/onert/backend/acl_common/Convert.h @@ -73,7 +73,6 @@ std::unique_ptr asFunction(std::unique_ptr<::arm_compute::IFunction> return std::make_unique(std::move(fn)); } -ir::Layout asRuntimeLayout(::arm_compute::DataLayout data_layout); ir::DataType asRuntimeDataType(::arm_compute::DataType data_type); arm_compute::PoolingType convertPoolType(ir::operation::Pool2D::PoolType pool_type_ir); diff --git a/runtime/onert/backend/trix/Convert.cc b/runtime/onert/backend/trix/Convert.cc index fe003e7ead5..684dc80dd53 100644 --- a/runtime/onert/backend/trix/Convert.cc +++ b/runtime/onert/backend/trix/Convert.cc @@ -23,19 +23,6 @@ namespace backend namespace trix { -data_layout convertDataLayout(const ir::Layout layout) -{ - switch (layout) - { - case ir::Layout::NCHW: - return DATA_LAYOUT_NCHW; - case ir::Layout::NHWC: - return DATA_LAYOUT_NHWC; - default: - throw std::runtime_error("Unknown Layout"); - } -} - data_type convertDataType(const ir::DataType type) { switch (type) diff --git a/runtime/onert/backend/trix/Convert.h b/runtime/onert/backend/trix/Convert.h index 9359f0a5084..12d7eea1943 100644 --- a/runtime/onert/backend/trix/Convert.h +++ b/runtime/onert/backend/trix/Convert.h @@ -31,14 +31,6 @@ namespace backend namespace trix { -/** - * @brief Convert type of layout from onert type to npu type - * - * @param layout Layout type in onert - * @return data_layout Layout type in npu - */ -data_layout convertDataLayout(const ir::Layout layout); - /** * @brief Convert type of data from onert type to npu type *