Skip to content

Conversation

@lucylq
Copy link
Contributor

@lucylq lucylq commented Nov 13, 2025

Stack from ghstack (oldest at bottom):

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

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](https://our.internmc.facebook.com/intern/diff/D86913756/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 13, 2025

🔗 Helpful Links

🧪 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.

❌ 14 New Failures, 2 Unrelated Failures

As of commit 0b2ffea with merge base 7600df8 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

lucylq added a commit that referenced this pull request Nov 13, 2025
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](https://our.internmc.facebook.com/intern/diff/D86913756/)

ghstack-source-id: 322868586
Pull Request resolved: #15802
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 13, 2025
@github-actions
Copy link

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.

@lucylq lucylq mentioned this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants