matmul_sr.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <memory>
8 #include <functional>
9 
10 #include <transformations_visibility.hpp>
11 
12 #include <ngraph/pass/graph_rewrite.hpp>
13 
14 namespace ngraph {
15 namespace pass {
16 
17 class TRANSFORMATIONS_API ReshapeAMatMul;
18 class TRANSFORMATIONS_API ReshapeBMatMul;
19 class TRANSFORMATIONS_API TransposeMatMul;
20 
21 } // namespace pass
22 } // namespace ngraph
23 
24 /**
25  * @ingroup ie_transformation_common_api
26  * @brief ReshapeAMatMul and ReshapeBMatMul transformations relax hard-coded Reshape followed by MatMul operation
27  * For 2D Reshape search patterns are:
28  * - MatMul(Reshape(any_input, any_input), any_input)
29  * - MatMul(any_input, Reshape(any_input, any_input))
30  */
31 
32 class ngraph::pass::ReshapeAMatMul: public ngraph::pass::MatcherPass {
33 public:
34  NGRAPH_RTTI_DECLARATION;
36 };
37 class ngraph::pass::ReshapeBMatMul: public ngraph::pass::MatcherPass {
38 public:
39  NGRAPH_RTTI_DECLARATION;
41 };
42 class ngraph::pass::TransposeMatMul: public ngraph::pass::MatcherPass {
43 public:
44  NGRAPH_RTTI_DECLARATION;
46 };
ReshapeAMatMul and ReshapeBMatMul transformations relax hard-coded Reshape followed by MatMul operati...
Definition: matmul_sr.hpp:32
Definition: matmul_sr.hpp:37
Definition: matmul_sr.hpp:42
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14