@@ -14,18 +14,30 @@ Graph optimization enums for configuring pattern handlers in NetsPresso's graph
1414
1515## Available Pattern Handlers
1616
17- | Category | Pattern Name | Status | Description |
18- | ----------| --------------| --------| -------------|
19- | ** Fuse** | ` PatternHandlerFuseBNToConv ` | ✓ | Fuse batch normalization to convolution layers |
20- | ** Fuse** | ` PatternHandlerFuseMathIntoConv ` | ✓ | Fuse math operators (add, sub, mul, div) to convolution recursively |
21- | ** Fuse** | ` PatternHandlerFuseMultiReshapeTranspose ` | ✓ | Fuse multiple reshapes and transposes into one |
22- | ** Fuse** | ` PatternHandlerFuseMultiBranchReshapeTranspose ` | To do | Fuse multiple branched reshapes and transposes into one |
23- | ** Fuse** | ` PatternHandlerFuseContinuousConcat ` | ✓ | Fuse continuous concatenation operations |
24- | ** Fuse** | ` PatternHandlerFoldingGeLU ` | ✓ | Optimize GeLU activation functions by folding |
25- | ** Fuse** | ` PatternHandlerFoldingSilu ` | ✓ | Optimize SiLU activation functions by folding |
26- | ** Fuse** | ` PatternHandlerFoldingRMSNorm ` | ✓ | Optimize RMS normalization layers by folding |
27- | ** Fuse** | ` PatternHandlerFoldingLayerNorm ` | ✓ | Optimize layer normalization operations by folding |
28- | ** Remove** | ` PatternHandlerRemoveUselessSlice ` | ✓ | Remove meaningless tensor slice operators |
29- | ** Replace** | ` PatternHandlerReplaceNegToConv ` | ✓ | Replace negation by depthwise convolution |
30- | ** Replace** | ` PatternHandlerReplaceMatmulToConv ` | ✓ | Replace matrix multiplication with convolution operations |
31- | ** Optimize** | ` PatternHandlerChangeAxisOfSoftmax ` | ✓ | Optimize softmax operations by changing axis configurations |
17+ | Category | Pattern Name | Status |
18+ | ----------| --------------| --------|
19+ | ** Fuse** | ` PatternHandlerFoldingGeLU ` | ✓ |
20+ | ** Fuse** | ` PatternHandlerFoldingSilu ` | ✓ |
21+ | ** Fuse** | ` PatternHandlerFoldingRMSNorm ` | ✓ |
22+ | ** Fuse** | ` PatternHandlerFoldingLayerNorm ` | ✓ |
23+ | ** Optimize** | ` PatternHandlerChangeAxisOfSoftmax ` | ✓ |
24+ | ** Replace** | ` PatternHandlerReplaceNegToConv ` | ✓ |
25+ | ** Fuse** | ` PatternHandlerFuseBNToConv ` | ✓ |
26+ | ** Fuse** | ` PatternHandlerFuseContinuousConcat ` | ✓ |
27+ | ** Fuse** | ` PatternHandlerFuseMathIntoConv ` | ✓ |
28+ | ** Replace** | ` PatternHandlerReplaceMatmulToConv ` | ✓ |
29+ | ** Fuse** | ` PatternHandlerFuseMultiReshapeTranspose ` | ✓ |
30+ | ** Fuse** | ` PatternHandlerFuseMultiBranchReshapeTranspose ` | ✓ |
31+ | ** Remove** | ` PatternHandlerRemoveUselessSlice ` | ✓ |
32+
33+ ## Usage Examples
34+
35+ ### Get All Available Pattern Handlers
36+
37+ ``` python
38+ from netspresso.enums.graph_optimize import GraphOptimizePatternHandler
39+
40+ # Get all available pattern handlers
41+ all_patterns = GraphOptimizePatternHandler.get_all()
42+ print (f " Available patterns: { len (all_patterns)} " )
43+ ```
0 commit comments