pattern

Applicable Products

All processors

Function Usage

Marks a method of PatternFusionPass as a decorator declared by an expression pattern.

Prototype

1
pattern(method: Callable[..., object]) -> Callable[..., object]

Parameters

Parameter

Input/Output

Description

method

Input

Instance method in the PatternFusionPass subclass. The signature should be method(self, inputs).

Returns

The original method object, which is collected as a pattern by PatternFusionPass during class definition

Restrictions

None