Class ov::pass::ConvertWeightCompressedConv1x1ToMatmul#

class ConvertWeightCompressedConv1x1ToMatmul : public ov::pass::MatcherPass#

ConvertWeightCompressedConv1x1ToMatmul transformation matches a weight-compressed Convolution with a 1x1 kernel and replaces it with a MatMul operation.

The transformation identifies the following pattern:

                  +---------+    +-----------+    +------+
                  | Weights |    | ZeroPoint |    |Scale |
                  +---------+    +-----------+    +------+
                        |              |             |
                        v              v             |
                    +-------+      +-------+         |
                    |Convert|      |Convert|         |
                    +-------+      +-------+         |
                         |             |             |
                         +-----+  +----+             |
                               |  |                  |
+------------+                 v  v                  |
| Activation |             +--------+                |
+------------+             |Subtract| (optional)     |
      |                    +--------+                |
      v                        |                     |
+-------------+                v                     |
| Transpose/  |           +----------+               |
| Reshape     |           | Multiply |<--------------+
+-------------+           +----------+
      |                        |
      |                  *-----------+
      |                  | Reshape   | (optional)
      |                  +-----------+
      |                        |
      |                        v
      |                  +-----------+
      +----------------->|Convolution|
                         |  (1x1)    |
                         +-----------+
                               |
                               v
                          +----------+
                          |Add (Bias)| (optional)
                          +----------+
                               |
                               v
                         +-----------+
                         |  Convert  | (optional)
                         +-----------+
                               |
                               v
                         +------------+
                         | Transpose/ |
                         |  Reshape   |
                         +------------+
and replaces it with:

+———&#8212;+ | Activation | +———&#8212;+ | | +——&#8212;+ +——–&#8212;+ +—&#8212;+ | | Weights | | ZeroPoint | |Scale | | +——&#8212;+ +——–&#8212;+ +—&#8212;+ | | | | | v v | | +—-&#8212;+ +—-&#8212;+ | | |Convert| |Convert| | | +—-&#8212;+ +—-&#8212;+ | | | | | | +–&#8212;+ +-&#8212;+ | | | | | | v v | | +—–&#8212;+ | | |Subtract| (optional) | | +—–&#8212;+ | | | | | v | | +——-&#8212;+ | | | Multiply |<———–&#8212;+ | +——-&#8212;+ | | | v | *——-&#8212;+ | | Reshape | (optional) | +——-&#8212;+ | | | v | +—–&#8212;+ +———-&#8212;> | MatMul | +—–&#8212;+ | v +——-&#8212;+ |Add (Bias)| (optional) +——-&#8212;+ | v +——–&#8212;+ | Convert | (optional) +——–&#8212;+ | v +———&#8212;+ | Reshape | (optional) +———&#8212;+