SIGN IN SIGN UP

[executorch][flat_tensor] Serialize flat tensor (#7641)

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

Serialize a flat tensor file. The resulting file looks like:

Header containing:
- flatbuffer offset and size
- segment data offset and size

Flatbuffer containing:
- Items described in [flat_tensor.fbs](https://www.internalfb.com/code/fbsource/[079ba95593be856a16783bd3f3b3579580595fbb]/fbcode/executorch/extension/flat_tensor/flat_tensor.fbs)

Tensor data (in segment)
- Raw tensor data


ghstack-source-id: 261273078
@exported-using-ghexport

Differential Revision: [D66374253](https://our.internmc.facebook.com/intern/diff/D66374253/)

Co-authored-by: lucylq <lfq@meta.com>
P
pytorchbot committed
7fa4b87adabe203d383ff4a9208ef2f94f47d676
Parent: 8a5f52b
Committed by GitHub <noreply@github.com> on 1/15/2025, 12:49:50 AM