Writes the serialized ExecuTorch binary to the file at `open_file`. Prefer to use this over `buffer`, as it writes to file without copying into a contiguous block of memory first, reducing the peak memory usage.
(self, open_file: io.BufferedIOBase)
| 692 | return self.exported_program |
| 693 | |
| 694 | def write_to_file(self, open_file: io.BufferedIOBase) -> None: |
| 695 | """ |
| 696 | Writes the serialized ExecuTorch binary to the file at `open_file`. Prefer to use this over |
| 697 | `buffer`, as it writes to file without copying into a contiguous block of memory first, |
| 698 | reducing the peak memory usage. |
| 699 | """ |
| 700 | self._get_pte_data().write_to_file(open_file) |
| 701 | |
| 702 | def write_tensor_data_to_file(self, outdir) -> None: |
| 703 | """ |
no test coverage detected