Skip to content

Commit be42e3b

Browse files
authored
Refactor _apply_replace_quant_nodes function signature
Updated the _apply_replace_quant_nodes function to accept a generic edge argument instead of EdgeProgramManager.
1 parent 45b4c4c commit be42e3b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

examples/arm/aot_arm_compiler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,9 @@ def _load_serialized_model(
199199
return model, example_inputs
200200

201201

202-
def _apply_replace_quant_nodes(edge: "EdgeProgramManager", args: argparse.Namespace):
203-
"""Apply the replace_quant_nodes pass to an EdgeProgramManager.
202+
def _apply_replace_quant_nodes(edge, args):
203+
"""Apply the replace_quant_nodes pass to the edge graph module."""
204204

205-
The `edge` argument is expected to be an EdgeProgramManager instance as
206-
returned by `to_edge_transform_and_lower`.
207-
"""
208205
if args.target != "vgf" and not args.direct_drive:
209206
edge = edge.transform([ReplaceQuantNodesPass()])
210207
return edge

0 commit comments

Comments
 (0)