Class ov::pass::MultiplyConvolutionFusion#

class MultiplyConvolutionFusion : public ov::pass::MatcherPass#

Multiply->Convolution fusion replaces following graph:

+—-—+ +——-—+ | Input

| | Constant | +—-—+ +——-—+ | |

| | v v +——-

—+ +———+ | Multiply | | Weights | +——-—+ +———+ | |

| | v v +————-

—+ | Convolution Op | +————-—+

to following:

                      +---------+   +----------+
                      | Weights |   | Constant |
                      +---------+   +----------+
                           |            |
                           ------  ------
                                |  |
                                v  v
     +-------+              +----------+
     | Input |              | Multiply |
     +-------+              +----------+
         |                       |
         -----------    ----------
                   |    |
                   v    v
              +----------------+
              | Convolution Op |
              +----------------+
where ‘Convolution Op’ is one of:
  • Convolution

  • ConvolutionBackpropData

  • GroupConvolution

  • GroupConvolutionBackpropData

Restrictions:

  • weights’ shape is static

  • if the constant input to Multiply has the same rank as weights, the constant first dimension has to be 1

  • constant input to Multiply has to be broadcastable to weights when ‘Convolution Op’ is either Convolution or GroupConvolution

  • shape of a constant input to Multiply has to be in one of following forms: (1), (1, 1, …, 1), (C, 1, …, 1), (1, C, 1, …, 1) when ‘Convolution Op’ is either ConvolutionBackpropData or GroupConvolutionBackpropData