yobx.xoptim.patterns_investigation#
modules
get_investigation_patterns#
- yobx.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 yobx.xoptim.patterns_api import pattern_table_doc from yobx.xoptim.patterns_investigation import get_investigation_patterns print(pattern_table_doc(get_investigation_patterns(), as_rst=True)) print()
>>>
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.
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.
SimplifyingEasyPatternFunction#
- class yobx.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 to understand the applied pattern. There is none by default but there some pattern may need to overwrite this.