Skip to content

[ET][native] Bundle sample method calls in .ptn packages - #24171

Open
digantdesai wants to merge 5 commits into
gh/digantdesai/177/basefrom
gh/digantdesai/177/head
Open

digantdesai wants to merge 5 commits into
gh/digantdesai/177/basefrom
gh/digantdesai/177/head

Conversation

@digantdesai

@digantdesai digantdesai commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

A .ptn can carry recorded method calls under samples/<method>/<set>/
as index.json plus data.safetensors; program loaders ignore them. A
sample is an ordered list of calls from the initial state with no reset
between, so stateful methods such as LLM prefill then teacher-forced decode
can be checked. Tolerance resolves per call, then sample, then set, and
write_samples warns above 1e-3.

write_samples and read_samples live in
exir/_serialize/_ptn_samples.py. The spec is in backends/native/README.md;
review it first.

Authored with Claude Code.

Differential Revision: D125544384

@pytorch-bot

pytorch-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24171

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

❌ 1 New Failure, 2 Cancelled Jobs, 1 Pending

As of commit a1b2448 with merge base 4db778e (image):

NEW FAILURE - The following job has failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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

@github-actions

Copy link
Copy Markdown

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.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]

This branch was previously deployed

1 inactive deployment
cadence — a1b24480 Deployed Oct 28, 2026 by digantdesai via hifi-op-test / hifi4 #34995
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants