Conversation
This continues the work from pytorch#17333. Change-Id: I35ac4cd5f6430ea89939453344c13e056b5c746c Signed-off-by: Chizkiyahu Raful <chizkiyahu.raful@arm.com>
Change-Id: Iebb6ff9151b76b352ef5dbb4d9bd23e2e622c326 Signed-off-by: Chizkiyahu Raful <chizkiyahu.raful@arm.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18129
Note: Links to docs will display an error until the docs builds have been completed. ❌ 10 Awaiting Approval, 1 New FailureAs of commit 1a41600 with merge base be0cdee ( AWAITING APPROVAL - The following workflows need approval before CI can run:
NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "partner: arm" |
|
@pytorchbot label "release notes: exir" |
|
@pytorchbot label ciflow/trunk |
|
To add these label(s) (ciflow/trunk) to the PR, please first approve the workflows that are awaiting approval (scroll to the bottom of this page). This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
There was a problem hiding this comment.
Pull request overview
This PR extends the EXIR serialization stack by adding a direct FlatBuffers → Python Program reader and updating deserialization/tests to use it, continuing the move away from JSON/flatc roundtrips introduced in #17333.
Changes:
- Add
_flatbuffer_to_program()to deserialize FlatBuffer bytes directly intoexecutorch.exir.schema.Programdataclasses. - Switch
deserialize_pte_binary()and related tests to use the new direct reader. - Remove the legacy JSON/
flatcconversion helpers and their associated tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
exir/_serialize/_flatbuffer_program.py |
Adds direct FlatBuffers unpack-to-dataclass conversion (including generated-module alias patching) via _flatbuffer_to_program(). |
exir/_serialize/_program.py |
Updates deserialize_pte_binary() to use _flatbuffer_to_program() instead of FlatBuffer→JSON→dataclass conversion. |
exir/_serialize/_flatbuffer.py |
Removes JSON/flatc Program conversion helpers that are no longer referenced. |
exir/_serialize/test/test_program.py |
Updates segment-peek tests to use _flatbuffer_to_program() and adds a richer-type deserialization test. |
exir/_serialize/test/test_flatbuffer_program.py |
Simplifies roundtrip testing to only cover the direct Python path. |
exir/_serialize/test/test_flatbuffer.py |
Removes tests for the deleted JSON-to-FlatBuffer Program conversion path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @@ -565,7 +637,7 @@ def test_round_trip_with_segments(self) -> None: | |||
| # this also implicity tests the case where we try parsing the entire | |||
There was a problem hiding this comment.
Typo in the comment: "implicity" should be "implicitly".
| # this also implicity tests the case where we try parsing the entire | |
| # this also implicitly tests the case where we try parsing the entire |
|
@JacobSzwejbka @lucylq
Please let me know if part 2 is too much. I made it a separate commit. Thanks |
exir: add flatbuffer-to-program reader
This continues the work from #17333.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell