@@ -294,28 +294,24 @@ static bool is_decompression_multiply(const std::shared_ptr<const ov::Node> node
294294 return true ;
295295 };
296296
297- // if (all_has_types(consumers, {ov::opset1::Reshape::get_type_info_static()}) || all_has_types(consumers, {ov::op::v1::Transpose::get_type_info_static()})) {
298- // for (const auto& consumer : consumers) {
299- // auto get_child_consumers = [&]() {
300- // auto child_consumers = consumer.get_node()->get_output_target_inputs(0);
301-
302- // // Reshape + Transpose chain
303- // if (all_has_types(child_consumers, { ov::op::v1::Transpose::get_type_info_static() })) {
304- // std::set<ov::Input<ov::Node>> next_child_consumers;
305- // for (const auto& child_consumer : child_consumers) {
306- // const auto grand_child_consumers = child_consumer.get_node()->get_output_target_inputs(0);
307- // next_child_consumers.insert(grand_child_consumers.begin(), grand_child_consumers.end());
308- // }
309- // return next_child_consumers;
310- // }
311- // return child_consumers;
312- // };
313-
314- // auto child_consumers = get_child_consumers();
315-
316- if (all_has_types (consumers, {ov::opset1::Reshape::get_type_info_static ()})) {
297+ if (all_has_types (consumers, {ov::opset1::Reshape::get_type_info_static ()}) || all_has_types (consumers, {ov::op::v1::Transpose::get_type_info_static ()})) {
317298 for (const auto & consumer : consumers) {
318- auto child_consumers = consumer.get_node ()->get_output_target_inputs (0 );
299+ auto get_child_consumers = [&]() {
300+ auto child_consumers = consumer.get_node ()->get_output_target_inputs (0 );
301+
302+ // Reshape + Transpose chain
303+ if (all_has_types (child_consumers, { ov::op::v1::Transpose::get_type_info_static () })) {
304+ std::set<ov::Input<ov::Node>> next_child_consumers;
305+ for (const auto & child_consumer : child_consumers) {
306+ const auto grand_child_consumers = child_consumer.get_node ()->get_output_target_inputs (0 );
307+ next_child_consumers.insert (grand_child_consumers.begin (), grand_child_consumers.end ());
308+ }
309+ return next_child_consumers;
310+ }
311+ return child_consumers;
312+ };
313+
314+ auto child_consumers = get_child_consumers ();
319315
320316 for (const auto & child_consumer : child_consumers) {
321317 const auto & type_info = child_consumer.get_node ()->get_type_info ();
0 commit comments