executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Do not restore constant_buffer, and use bytes instead of Buffer

Open lucylq opened this issue 2 months ago • 2 comments

Stack from ghstack (oldest at bottom):

  • -> #15802
  • #15801
  • #15800

All constants are serialized in the segment (none in the Program).

This PR:

  1. Places constant data into the PTEFile class instead of restoring it into the Program.
  2. Use List[bytes] instead of List[Buffer] for constant and mutable data. Buffer was initially used to maintain alignment; now, constants are serialized with alignment in the segment, and Buffer is not required.

Update tests.

After this, we can mark 'constant_buffer' as deprecated, as it's no longer being used in deserialization or emitter.

Differential Revision: D86913756

lucylq avatar Nov 13 '25 02:11 lucylq

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15802

Note: Links to docs will display an error until the docs builds have been completed.

:x: 15 New Failures, 1 Unrelated Failure

As of commit dce4f45ab78eed8a5ebf440187c945ebe424d3ee with merge base 7600df87abadd0d486114c58b0c993e1aa70c8c5 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Nov 13 '25 02:11 pytorch-bot[bot]

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example @pytorchbot label "release notes: none"

For more information, see https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

github-actions[bot] avatar Nov 13 '25 02:11 github-actions[bot]