Skip to content

Commit e9164f1

Browse files
authored
[onert] Remove MatrixBandPart support (#15317)
This commit removes MatrixBandPart support in onert and tests. MatrixBandPart is split into many other builtin ops. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
1 parent b3234ff commit e9164f1

27 files changed

Lines changed: 2 additions & 467 deletions

runtime/compute/cker/include/cker/operation/MatrixBandPart.h

Lines changed: 0 additions & 78 deletions
This file was deleted.

runtime/onert/backend/cpu/KernelGenerator.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#include "ops/UnpackLayer.h"
6464
#include "ops/SquaredDiffLayer.h"
6565
#include "ops/L2NormLayer.h"
66-
#include "ops/MatrixBandPartLayer.h"
6766
#include "ops/BatchMatMulLayer.h"
6867
#include "ops/BroadcastToLayer.h"
6968
#include "ops/FusedBatchNormLayer.h"
@@ -1132,24 +1131,6 @@ void KernelGenerator::visit(const ir::operation::Tile &node)
11321131
_return_fn = std::move(fn);
11331132
}
11341133

1135-
void KernelGenerator::visit(const ir::operation::MatrixBandPart &node)
1136-
{
1137-
const auto output_index{node.getOutputs().at(0)};
1138-
const auto input_index{node.getInputs().at(ir::operation::MatrixBandPart::INPUT)};
1139-
const auto num_lower_index{node.getInputs().at(ir::operation::MatrixBandPart::NUM_LOWER_DIAG)};
1140-
const auto num_upper_index{node.getInputs().at(ir::operation::MatrixBandPart::NUM_UPPER_DIAG)};
1141-
1142-
auto output_tensor = _tensor_reg->getPortableTensor(output_index);
1143-
auto input_tensor = _tensor_reg->getPortableTensor(input_index);
1144-
auto num_lower_tensor = _tensor_reg->getPortableTensor(num_lower_index);
1145-
auto num_upper_tensor = _tensor_reg->getPortableTensor(num_upper_index);
1146-
1147-
auto fn = std::make_unique<ops::MatrixBandPartLayer>();
1148-
1149-
fn->configure(input_tensor, num_lower_tensor, num_upper_tensor, output_tensor);
1150-
_return_fn = std::move(fn);
1151-
}
1152-
11531134
void KernelGenerator::visit(const ir::operation::DetectionPostProcess &node)
11541135
{
11551136
using NMS = ir::operation::DetectionPostProcess;

runtime/onert/backend/cpu/KernelGenerator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ class KernelGenerator : public basic::KernelGeneratorBase
6363
void visit(const ir::operation::L2Normalization &) override;
6464
void visit(const ir::operation::LogSoftmax &) override;
6565
void visit(const ir::operation::LSTM &) override;
66-
void visit(const ir::operation::MatrixBandPart &) override;
6766
void visit(const ir::operation::DetectionPostProcess &) override;
6867
void visit(const ir::operation::OneHot &) override;
6968
void visit(const ir::operation::Pack &) override;

runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc

Lines changed: 0 additions & 81 deletions
This file was deleted.

runtime/onert/backend/cpu/ops/MatrixBandPartLayer.h

Lines changed: 0 additions & 51 deletions
This file was deleted.

runtime/onert/core/include/compiler/StaticShapeInferer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ class StaticShapeInferer : public ir::OperationVisitor
137137
void visit(const ir::operation::L2Normalization &op) override;
138138
void visit(const ir::operation::Loss &op) override;
139139
void visit(const ir::operation::LSTM &op) override;
140-
void visit(const ir::operation::MatrixBandPart &op) override;
141140
void visit(const ir::operation::OneHot &op) override;
142141
void visit(const ir::operation::Pack &op) override;
143142
void visit(const ir::operation::Pad &op) override;

runtime/onert/core/include/exec/DynamicShapeInferer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class DynamicShapeInferer : public ir::OperationVisitor
6262
void visit(const ir::operation::Gather &op) override;
6363
void visit(const ir::operation::L2Normalization &op) override;
6464
void visit(const ir::operation::LSTM &op) override;
65-
void visit(const ir::operation::MatrixBandPart &op) override;
6665
void visit(const ir::operation::DetectionPostProcess &op) override;
6766
void visit(const ir::operation::OneHot &op) override;
6867
void visit(const ir::operation::Pack &op) override;

runtime/onert/core/include/ir/Operations.Include.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#include "ir/operation/LogSoftmax.h"
5151
#include "ir/operation/Loss.h"
5252
#include "ir/operation/LSTM.h"
53-
#include "ir/operation/MatrixBandPart.h"
5453
#include "ir/operation/DetectionPostProcess.h"
5554
#include "ir/operation/OneHot.h"
5655
#include "ir/operation/Pack.h"

runtime/onert/core/include/ir/Operations.lst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ OP(L2Normalization)
5252
OP(LocalResponseNormalization)
5353
OP(LogSoftmax)
5454
OP(LSTM)
55-
OP(MatrixBandPart)
5655
OP(DetectionPostProcess)
5756
OP(OneHot)
5857
OP(Pack)

runtime/onert/core/include/ir/operation/MatrixBandPart.h

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)