@@ -58,8 +58,8 @@ GLUFusion::GLUFusion() {
5858 OPENVINO_ASSERT (pattern_map.count (swish_m) || pattern_map.count (gelu_m));
5959 OPENVINO_ASSERT (pattern_map.count (variadic_split_m));
6060 OPENVINO_ASSERT (pattern_map.count (axis_const_m));
61- const auto mul_node = pattern_map.at (mul_m).get_node_shared_ptr ();
62- if (!mul_node || transformation_callback (mul_node ))
61+ auto mul = ov::as_type_ptr<v1::Multiply>( pattern_map.at (mul_m).get_node_shared_ptr () );
62+ if (!mul || transformation_callback (mul ))
6363 return false ;
6464
6565 auto isSwiGLU = pattern_map.count (swish_m);
@@ -72,8 +72,8 @@ GLUFusion::GLUFusion() {
7272 glu_type = ov::op::internal::GLU ::GluType::Swish;
7373 split_to_glu_idx = swish->input_value (0 ).get_index ();
7474
75- size_t split_in_idx = ov::is_type<v4::Swish>(mul_node ->get_input_node_shared_ptr (0 )) ? 1 : 0 ;
76- if (mul_node ->input_value (split_in_idx).get_index () == split_to_glu_idx)
75+ size_t split_in_idx = ov::is_type<v4::Swish>(mul ->get_input_node_shared_ptr (0 )) ? 1 : 0 ;
76+ if (mul ->input_value (split_in_idx).get_index () == split_to_glu_idx)
7777 return false ;
7878 } else if (isGeGLU) {
7979 auto gelu = ov::as_type_ptr<v7::Gelu>(pattern_map.at (gelu_m).get_node_shared_ptr ());
@@ -82,8 +82,8 @@ GLUFusion::GLUFusion() {
8282 : ov::op::internal::GLU ::GluType::Gelu_Tanh;
8383 split_to_glu_idx = gelu->input_value (0 ).get_index ();
8484
85- size_t split_in_idx = ov::is_type<v7::Gelu>(mul_node ->get_input_node_shared_ptr (0 )) ? 1 : 0 ;
86- if (mul_node ->input_value (split_in_idx).get_index () == split_to_glu_idx)
85+ size_t split_in_idx = ov::is_type<v7::Gelu>(mul ->get_input_node_shared_ptr (0 )) ? 1 : 0 ;
86+ if (mul ->input_value (split_in_idx).get_index () == split_to_glu_idx)
8787 return false ;
8888 } else {
8989 OPENVINO_THROW (" 'glu_type' not initialized" );
0 commit comments