Repository navigation
Conversation
Serialize bundled inputs and expected outputs in the dimension order declared by the program. This preserves channels-last values and avoids layout mismatches when eager test tensors have permuted strides. Reconstruct ATen tensors using the serialized dimension order. Keep layout conversion within BundledProgram instead of adding a preserve_layout flag to TensorSpec.from_tensor. Cover channels-last tensors, offset and non-dense views, and permuted outputs, including portable runtime verification. Correct the dim_order_from_stride return annotation and update Buck dependencies. Assisted by OpenAI Codex. Co-authored-by: Zingo Andersen <Zingo.Andersen@arm.com> Signed-off-by: Erik Lundell <erik.lundell@arm.com> Change-Id: I4d05a144aafbb0fbd25bfbbd161c4eebc8dc2b0f
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23927
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 335 PendingAs of commit 3321612 with merge base 403800d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@claude - Review this PR. |
|
Claude finished @zingo's task in 2m 17s —— View job The serialization logic looks correct; I found one performance regression on the Detailed reviewPR Review: #23927SummaryThis PR serializes bundled inputs and expected outputs in the dim order each method declares for its I/O, and rebuilds ATen bundled tensors with matching strides. The conversion is correct, but Performance
Code Quality
RecommendationApprove Nothing blocks merging. I'd still address the full-PTE deserialization before landing, because it penalizes every file-based bundle in proportion to model size. |
Keep the two bundled-program tests separate from the ordinary input layout tests added upstream. Move the existing tests before test_e2e without changing their bodies. Keep this adjustment on top of the original patch for separate code and IP review. Squash the two commits before the upstream merge. Authored with assistance from OpenAI Codex. Change-Id: I4e170bbbe3c3dbbe2c4e5c907a8de7c7acbf02eb Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
…ogram-I/O-layouts
Restore the TensorSpec.from_tensor signature and comment to keep the original layout fix focused. Authored with assistance from OpenAI Codex. Change-Id: I00b17a0cf26675edda350694a37e241605727bd4 Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
Read method I/O metadata through FlatBuffers accessors instead of unpacking the entire program. Avoid copying weights and delegate payloads just to obtain tensor dimension orders. Add a regression test that bundles a saved program without unpacking the program or restoring its payload segments. Check file and memory bundles agree for multiple methods and primitive inputs. Authored with assistance from OpenAI Codex. Change-Id: Ic966f59f261a96501abcd9f37a26a4494aa2354f Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
Materialize pending conjugation and negation before copying tensor bytes. Contiguous views can retain these flags and otherwise serialize the underlying storage values instead of their logical values. Keep tensor byte packing independent of a program instance. Cover a negative view created from a conjugate and a tensor with pending conjugation. The former previously serialized correctly through TensorSpec, which cloned the view before copying storage. Authored with assistance from OpenAI Codex. Change-Id: Ia7c77e1b55ecbaa3ce3578e36aca4690cd400ccb Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
|
@claude - re-Review this PR. |
|
Claude finished @zingo's task in 3m 38s —— View job One issue from my first review is still open: bundles built from Detailed reviewPR Review: #23927SummaryThis PR serializes bundled inputs and expected outputs in the dim order each method declares for its I/O, and rebuilds ATen bundled tensors with the matching strides. Two findings from the earlier review are resolved: the full-PTE deserialization (the file path now reads only I/O metadata from the flatbuffer) and the leftover Code Quality
RecommendationApprove Nothing blocks merging. The |
Use Tuple[int, ...] for dim_order in TensorSpec and _ViewSpec to match the return type of dim_order_from_stride. Runtime behavior is unchanged. Authored with assistance from OpenAI Codex. Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: I049655d7d62ec276082c7dca3e3453e5d7643638
|
@claude please re-review I have a follow up PR for "BundleIO: Validate file-based and in-memory test data consistently Share validation using method I/O metadata for both program sources. The runtime verifier expects one reference value per model output. Add regression coverage for invalid test data and preserve support for |
|
Claude finished @zingo's task in 5m 0s —— View job I'd keep the validation work as a separate follow-up PR. This PR has no blockers; three of its new tests pass on the old code too, and one earlier design concern is still open. On the follow-up PRRecommendation: keep it separate and land it right after this one.
Detailed reviewPR Review: #23927SummaryThis PR serializes bundled inputs and expected outputs in the dim order each method declares, and rebuilds ATen bundled tensors with matching strides. Most points from the previous review are fixed: full-PTE deserialization, the leftover Testing
Code Quality
RecommendationApprove Nothing blocks merging. The test findings are about how well the tests catch regressions, not about the fix being wrong. Land the validation follow-up soon after this PR so the period where Not checked at runtime: whether |
|
Hi @rascani and @digantdesai would this need internal testing? |
Serialize bundled inputs and expected outputs in the dimension order declared by the program. This preserves channels-last values and avoids layout mismatches when eager test tensors have permuted strides.
Reconstruct ATen tensors using the serialized dimension order. Keep layout conversion within BundledProgram instead of adding a preserve_layout flag to TensorSpec.from_tensor.
Cover channels-last tensors, offset and non-dense views, and permuted outputs, including portable runtime verification. Correct the dim_order_from_stride return annotation and update Buck dependencies.
Assisted by OpenAI Codex.
cc @digantdesai @freddan80 @per @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani