[executorch][emitter] Emit FQNs
Pull Request resolved: https://github.com/pytorch/executorch/pull/7192
Emit FQNs for external tensors. In the emitter, store external tensors as:
```
// list of unique tensors
external_constants_buffer: List[bytes]
// map of {constant_tag: {fqn: index into external_constant_buffer}}
// constant_tag: may want to save multiple external constant files; group them together via the tag.
// {fqn: index}; there may be multiple fqns pointing to the same data buffer. This is for deduplication.
external_constants_map: [Dict[str, Dict[str, int]]
```
ghstack-source-id: 257245125
@exported-using-ghexport
Differential Revision: [D66523226](https://our.internmc.facebook.com/intern/diff/D66523226/)
Co-authored-by: lucylq <lfq@meta.com> P
pytorchbot committed
4f987502e367d55524f381b1e8ae41cd8bdb4153
Parent: a6841d5
Committed by GitHub <noreply@github.com>
on 12/10/2024, 6:13:25 AM