Skip to content

Commit

Permalink
Another taste
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Jun 8, 2023
1 parent a513ef0 commit 7089efe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/common/snippets/src/lowered/loop_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ void LinearIR::LoopManager::get_io_loop_ports(LinearIR::constExprIt loop_begin_p
const auto& expr = *expr_it;
for (size_t i = 0; i < expr->get_input_count(); ++i) {
const auto in_port = expr->get_input_port(i);
const auto source_port = *in_port.get_connected_ports().begin();
const auto& parent_expr = source_port.get_expr();
const auto parent_expr = in_port.get_connected_ports().begin()->get_expr();
if (!ov::is_type<ov::op::v0::Constant>(parent_expr->get_node()) &&
std::find(loop_begin_pos, expr_it, parent_expr) == expr_it) {
entries.push_back(in_port);
Expand Down
6 changes: 2 additions & 4 deletions src/common/snippets/src/lowered/pass/assign_registers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@ bool AssignRegisters::run(LinearIR& linear_ir) {
// TODO: Fix via common pipeline using LoopEnd:
// All operations `outside loop` after Horizon ops should have the same register to avoid using it in the next Loop
const auto current_loops_ids = expr->get_loop_ids();
auto port = *output_tensor->get_consumers().begin();
auto next_expr = port.get_expr();
auto next_expr = output_tensor->get_consumers().begin()->get_expr();
while (next_expr->get_loop_ids() == current_loops_ids) {
manually_assigned_vecs[next_expr->get_output_port_connector(0)] =
static_cast<Reg>(accumulator_reg);
port = *next_expr->get_output_port_connector(0)->get_consumers().begin();
next_expr = port.get_expr();
next_expr = next_expr->get_output_port_connector(0)->get_consumers().begin()->get_expr();
}

accumulator_reg++;
Expand Down

0 comments on commit 7089efe

Please sign in to comment.