File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
modelopt/onnx/quantization Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ def _build_fusible_partition(
4545
4646 Add a nodes to the partition if any of these holds:
4747 1. The node is a unary or binary pointwise operation and fusible by cask
48- 2. The node is BN and/or Relu and fusible with preceding Conv op
49- 3. The node is a residual Add and fusible with current partition
48+ 2. The node is BN and/or Relu and fusible with preceding Conv op (Conv-Act fusion)
49+ 3. The node is MaxPool following a Conv-Act pattern (Conv-Act-Pool fusion)
50+ 4. The node is a residual Add and fusible with current partition
5051
5152 Args:
5253 cur_node: Current candidate node for the partition.
@@ -135,7 +136,7 @@ def _is_fusible_mul(mul_node: Node) -> bool:
135136 and _is_cask_fusible (consumer_node , partition_node_outputs )
136137 )
137138 or (
138- consumer_node .op in ["BatchNormalization" , "Relu" ]
139+ consumer_node .op in ["MaxPool" , " BatchNormalization" , "Relu" ]
139140 and get_fusible_backbone (consumer_node , graph )
140141 )
141142 or _is_on_non_residual_path (consumer_node )
You can’t perform that action at this time.
0 commit comments