Skip to content

Commit 7c0c99b

Browse files
committed
Arm backend: Use quant model for bundled PTE when available
1 parent cc7bfe3 commit 7c0c99b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/arm/aot_arm_compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,9 @@ def to_edge_no_delegate(exported_program, args, model: torch.nn.Module, example_
759759
output_name = os.path.join(args.output, output_name)
760760

761761
if args.bundleio:
762-
save_bpte_program(exec_prog, original_model, output_name)
762+
# Realize the quantization impact on numerics when generating reference output
763+
reference_model = original_model if not model_int8 else model_int8
764+
save_bpte_program(exec_prog, reference_model, output_name)
763765
print(f"Bundle PTE file saved as {output_name}")
764766
else:
765767
save_pte_program(exec_prog, output_name)

0 commit comments

Comments
 (0)