Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[onert] Remove unnecessary op conversion #14168

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ void TrainableOperationConverter::visit(const ir::operation::FullyConnected &nod
_return_op = std::make_unique<ir::train::operation::FullyConnected>(node);
}

void TrainableOperationConverter::visit(const ir::operation::Loss &node)
{
const auto &y_pred_index = node.getInputs().at(ir::operation::Loss::Input::Y_PRED);
const auto &y_pred = _tgraph.operands().at(y_pred_index);
const auto &y_pred_node = _tgraph.operations().at(y_pred.getDef());
const auto y_pred_op_code = y_pred_node.opcode();

_return_op =
std::make_unique<ir::train::operation::Loss>(node, _training_info->lossInfo(), y_pred_op_code);
}

void TrainableOperationConverter::visit(const ir::operation::Pad &node)
{
_return_op = std::make_unique<ir::train::operation::Pad>(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class TrainableOperationConverter : public UntrainableOperationConverter
void visit(const ir::operation::DepthwiseConv2D &) override;
void visit(const ir::operation::ElementwiseActivation &) override;
void visit(const ir::operation::FullyConnected &) override;
void visit(const ir::operation::Loss &node) override;
// ir::operation::Loss is inserted and converted only by LossInsertionPass
void visit(const ir::operation::Pad &node) override;
void visit(const ir::operation::Permute &node) override;
void visit(const ir::operation::Pool2D &node) override;
Expand Down