build

Applicable Products

All processors

Function Usage

Builds and returns a PatternMatcherConfig instance.

Prototype

1
build() -> PatternMatcherConfig

Parameters

None

Returns

Constructed PatternMatcherConfig instance

Restrictions

If the build fails on the C++ side, RuntimeError is thrown.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from ge.passes import PatternFusionPass, PatternMatcherConfigBuilder


class TestPass(PatternFusionPass):
    def __init__(self):
        super().__init__(
            PatternMatcherConfigBuilder()
            .enable_const_value_match()
            .enable_ir_attr_match()
            .build()
        )