Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions backends/cadence/aot/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ fbcode_target(_kind = runtime.python_library,
":compiler_funcs",
":utils",
"//caffe2:torch",
"//executorch/backends/cadence/aot/quantizer:fusion_pass",
"//executorch/backends/cadence/aot/quantizer/passes:fuse_ops",
"//executorch/backends/cadence/aot/quantizer:quantizer",
"//executorch/backends/transforms:decompose_sdpa",
Expand All @@ -65,7 +64,6 @@ fbcode_target(_kind = runtime.python_library,
":replace_ops",
":utils",
"//caffe2:torch",
"//executorch/backends/cadence/aot/quantizer:fusion_pass",
"//executorch/backends/cadence/aot/quantizer:quantizer",
"//executorch/backends/cadence/runtime:runtime",
"//executorch/backends/transforms:decompose_sdpa",
Expand Down
8 changes: 4 additions & 4 deletions backends/cadence/aot/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
import torch
from executorch.backends.cadence.aot.compiler_funcs import (
prepare as prepare_fn,
QuantFusionPass,
QuantizedInputWrapper,
trace as trace_fn,
)
from executorch.backends.cadence.aot.memory_planning import (
CadenceMemoryPlanning,
print_memory_planning_info,
)
from executorch.backends.cadence.aot.quantizer.fusion_pass import QuantFusion
from executorch.backends.cadence.aot.quantizer.passes.fuse_ops import FuseQATConvBN
from executorch.backends.cadence.aot.quantizer.quantizer import (
CadenceDefaultQuantizer,
Expand Down Expand Up @@ -154,9 +154,9 @@ def apply_pre_edge_transform_passes(
quantizer: CadenceQuantizer,
) -> ExportedProgram:
"""
Apply pre-edge transform passes including QuantFusion and torch ops passes.
Apply pre-edge transform passes including QuantFusionPass and torch ops passes.
This mirrors the Cadence AOT compiler flow:
1. QuantFusion - fuses dq->op->q patterns
1. QuantFusionPass - fuses dq->op->q patterns
2. apply_torch_ops_passes - applied just before to_edge()

The quantizer must be the same as the one used to convert the model.
Expand All @@ -169,7 +169,7 @@ def apply_pre_edge_transform_passes(
PassManager(
[
FuseQATConvBN(converted_program),
QuantFusion(patterns),
QuantFusionPass(patterns),
]
)(converted_program.graph_module)

Expand Down
Loading