Skip to content
Merged
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
8 changes: 3 additions & 5 deletions examples/arm/aot_arm_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,7 @@ def save_bpte_program(exec_prog, original_model: torch.nn.Module, output_name: s
save_bundled_program(exec_prog, method_test_suites, output_name)


def quantize_model(
exported_program, args, model: torch.nn.Module, example_inputs, compile_spec
):
def quantize_model(args, model: torch.nn.Module, example_inputs, compile_spec):
model_int8 = quantize(
model,
args.model_name,
Expand Down Expand Up @@ -705,7 +703,7 @@ def to_edge_TOSA_delegate(
model_int8 = None
if args.quantize:
model_int8, exported_program = quantize_model(
exported_program, args, model, example_inputs, compile_spec
args, model, example_inputs, compile_spec
)
model = model_int8

Expand Down Expand Up @@ -741,7 +739,7 @@ def to_edge_no_delegate(exported_program, args, model: torch.nn.Module, example_
args.memory_mode,
)
model, exported_program = quantize_model(
exported_program, args, model, example_inputs, compile_spec
args, model, example_inputs, compile_spec
)
model_int8 = model

Expand Down
Loading