Skip to content

Commit

Permalink
[onert] Remove backend layout helper (#14019)
Browse files Browse the repository at this point in the history
This commit removes unused backend layout helper functions.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Sep 19, 2024
1 parent 10fbedb commit 4773ee9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 35 deletions.
13 changes: 0 additions & 13 deletions runtime/onert/backend/acl_common/Convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,6 @@ std::unique_ptr<AclFunction> asAclFunction(std::unique_ptr<::arm_compute::IFunct
return std::make_unique<AclFunction>(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)
Expand Down
1 change: 0 additions & 1 deletion runtime/onert/backend/acl_common/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ std::unique_ptr<T_Function> asFunction(std::unique_ptr<::arm_compute::IFunction>
return std::make_unique<T_Function>(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);
Expand Down
13 changes: 0 additions & 13 deletions runtime/onert/backend/trix/Convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions runtime/onert/backend/trix/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 4773ee9

Please sign in to comment.