SIGN IN SIGN UP

Generate ETRecord from llama export script (#2362)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2362

This diff is to make the llama export script be able to generate the etrecord during export. Followed this doc: https://pytorch.org/executorch/main/sdk-etrecord.html#generating-an-etrecord. The idea is:
1. Get the `EdgeProgramManager` object returned by `to_edge()` and make a deep copy of it;
2. Get the `ExecutorchProgramManager` object returned by `to_executorch()`;
3. Pass those 2 to generate_etrecord(), which will then write the etrecord artifact in etrecord.bin.

bypass-github-export-checks
bypass-github-pytorch-ci-checks
bypass-github-executorch-ci-checks

Reviewed By: Jack-Khuu

Differential Revision: D54785962

fbshipit-source-id: 45a4e3d62e2745121e50c5f4423861ea8fe3cff7
O
Olivia Liu committed
8f830de76cccb114853dd45ea2fb9f6193907f22
Parent: 4670211
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 3/13/2024, 2:26:30 AM