experimental_experiment.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 experimental_experiment.xoptim.patterns_investigation. llm_patterns.FunctionPowTanhPattern to see how to use it.

post_apply_pattern(g, *nodes)[source]

Method to overload to apply as step after the pattern was applied.

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.

<<<

import pprint
from experimental_experiment.xoptim.patterns_investigation import (
    get_investigation_patterns,
)

pprint.pprint(get_investigation_patterns())

>>>

    [BinaryInvestigation(),
     FunctionPackedMatMulPattern(),
     FunctionPowTanhPattern(),
     FunctionSplitRotaryMulPattern()]