Skip to content
Open
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
4 changes: 2 additions & 2 deletions backends/arm/scripts/aot_arm_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ def main() -> None: # noqa: C901
args.calibration_data, example_inputs
)
model = original_model.eval()
model.requires_grad_(False)

# export under the assumption we quantize, the exported form also works
# in to_edge if we don't quantize
Expand Down Expand Up @@ -1115,8 +1116,6 @@ def main() -> None: # noqa: C901

dump_delegation_info(edge, args.intermediates)

edge_program_manager_copy = copy.deepcopy(edge)

try:
exec_prog = edge.to_executorch(
config=ExecutorchBackendConfig(extract_delegate_segments=False)
Expand Down Expand Up @@ -1175,6 +1174,7 @@ def main() -> None: # noqa: C901
if args.bundleio or args.etrecord:
etrecord_file_name = os.path.splitext(output_file_name)[0] + "_etrecord.bin"
try:
edge_program_manager_copy = copy.deepcopy(edge)
generate_etrecord(etrecord_file_name, edge_program_manager_copy, exec_prog)
print(f"ETRecord saved as {etrecord_file_name}")
except Exception as e:
Expand Down
Loading