.xoptim.patterns_investigation¶
- class experimental_experiment.xoptim.patterns_investigation.SimplifyingEasyPatternFunction(verbose: int = 0, priority: int = 0, min_opset: int = 1)[source]¶
Base class to build investigation patterns. See
FunctionPowTanhPatternto see how to use it. It replaces a subgraph with a local function.- add_local_functions_to_builder(g2: GraphBuilder)[source]¶
Adds missing local functions ot understand the applied pattern. There is none by default but there some pattern may need to overwrite this.
- experimental_experiment.xoptim.patterns_investigation.get_investigation_patterns(verbose: int = 0) List[PatternOptimization][source]¶
Returns a default list of patterns for investigations. They do nothing but prints information if verbose > 0.
<<<
from experimental_experiment.xoptim.patterns_api import pattern_table_doc from experimental_experiment.xoptim.patterns_investigation import ( get_investigation_patterns, ) print(pattern_table_doc(get_investigation_patterns(), as_rst=True))
>>>
name
short_name
priority
doc
0
BinaryInvestigation
BinaryInvestigation
1
Looks into
1
FunctionPackedMatMulPattern
FunctionPackedMatMul
1
Replaces multiple MatMul (X,A), (X,B) by (X, concat(A,B))…
2
FunctionPowTanhPattern
FunctionPowTanh
0
Moves the nodes in match_pattern into a local function. .. runpython
3
FunctionSplitRotaryMulPattern
FunctionSplitRotaryMul
0
Moves the nodes in match_pattern into a local function. This is only applicable when the pattern to match has more than one node. .. runpython