Skip to content

Commit

Permalink
[Snippets] Fixed uniqie_buffer_reg_group_count in MHATokenization pass
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Aug 21, 2024
1 parent 5c4ccea commit 2c26e56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/common/snippets/src/pass/mha_tokenization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
parent = parent->get_input_node_shared_ptr(0);
has_matmul0_has_ops_on_input = true;
}
// If there are ops on second input of MatMul0 -> there always will be unique Buffer
if (has_matmul0_has_ops_on_input) {
// If there are ops on second input of MatMul0 and only one unique Buffer between MatMuls - there must be one more unique Buffer
if (has_matmul0_has_ops_on_input && uniqie_buffer_reg_group_count < 2) {
uniqie_buffer_reg_group_count++;
}

Expand Down Expand Up @@ -592,6 +592,7 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken

// mark the Subgraph as Completed to not allow Snippets to include any nodes into the MHA Subgraph in common Tokenization
SetSnippetsSubgraphType(subgraph, SnippetsSubgraphType::Completed);
std::cout << "tokenized\n";

return true;

Expand Down

0 comments on commit 2c26e56

Please sign in to comment.