@@ -458,7 +458,7 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
458
458
/* ================================ */
459
459
460
460
/* ====== Subgraph creation ======= */
461
- /*
461
+
462
462
ov::OutputVector body_inputs, subgraph_inputs;
463
463
ov::ParameterVector body_parameters;
464
464
ov::ResultVector body_results;
@@ -471,7 +471,7 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
471
471
const auto constant = ov::as_type_ptr<ov::op::v0::Constant>(parent);
472
472
if (constant && (ov::shape_size (input.get_shape ()) == 1 ||
473
473
ov::is_type<ov::op::v0::FakeQuantize>(node) ||
474
- constant_input_should_be_inside_body(node))) {
474
+ ov::snippets::utils:: constant_input_should_be_inside_body (node))) {
475
475
// If Constant has one consumer - target node, we add Constant to body_inputs
476
476
// If Constant has several consumers, we should check that all these consumers are inside Subgraph body
477
477
// and if all of them are inside body, we can explicitly add Constant to the body_inputs, otherwise we should
@@ -525,7 +525,7 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
525
525
OPENVINO_THROW (" body results and node results size mismatch during subgraph collapse" );
526
526
}
527
527
528
- auto body = op ::create_body(last_node->get_friendly_name(), body_results, body_parameters);
528
+ auto body = ov::snippets::utils ::create_body (last_node->get_friendly_name (), body_results, body_parameters);
529
529
auto subgraph = std::make_shared<op::Subgraph>(subgraph_inputs, body);
530
530
// Copy runtime info from last node to subgraph - to copy topological order
531
531
copy_runtime_info (last_node, subgraph);
@@ -536,7 +536,7 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
536
536
target_input.replace_source_output (subgraph->output (i));
537
537
}
538
538
}
539
- op ::update_out_tensor_name(subgraph);
539
+ ov::snippets::utils ::update_out_tensor_name (subgraph);
540
540
541
541
subgraph->validate_and_infer_types ();
542
542
@@ -545,9 +545,6 @@ ov::snippets::pass::TokenizeMHASnippets::TokenizeMHASnippets(const SnippetsToken
545
545
act_body->get_parameters ()[i]->set_friendly_name (body_parameters[i]->get_friendly_name ());
546
546
}
547
547
subgraph->get_rt_info ()[" originalLayersNames" ] = fused_names;
548
- */
549
-
550
- auto subgraph = utils::wrap_nodes_as_subgraph (ordered_ops);
551
548
subgraph->set_virtual_port_count (hidden_virtual_ports_count);
552
549
553
550
// mark the Subgraph as Completed to not allow Snippets to include any nodes into the MHA Subgraph in common Tokenization
0 commit comments