Skip to content

[executorch][native-ptn] Write byte-identical PTN packages for identical inputs - #25380

Open
digantdesai wants to merge 1 commit into
gh/digantdesai/229/basefrom
gh/digantdesai/229/head
Open

digantdesai wants to merge 1 commit into
gh/digantdesai/229/basefrom
gh/digantdesai/229/head

Conversation

@digantdesai

@digantdesai digantdesai commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

write_ptn and write_samples fix every member's zip metadata (earliest zip
timestamp, owner read/write, Unix host); the package layout and the PTN schema
are unchanged.

Two exports of the same model gave .ptn files that differed only in zip member
timestamps, so a file hash could not show that an export is deterministic.

Authored with assistance from Claude and Codex.

Differential Revision: D131566108

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ 1 Pending, 1 Unrelated Failure

As of commit f444be7 with merge base 90bd617 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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.

@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 20, 2026

@SS-JIA SS-JIA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@JakeStevens JakeStevens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff landed internally; approving.

@SS-JIA SS-JIA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff landed internally; approving.

meta-codesync Bot pushed a commit that referenced this pull request Nov 20, 2026
…uts to F32

Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom):
* #25381
* #25380
* #25379
* #25378
* #25377
* #25376
* #25375
* #25374
* #25373
* #25372
* #25371
* #25370
* #25369
* __->__ #25368

layer_norm widens F16 and BF16 inputs, weight and bias to F32 and normalizes
in F32 as eager does; set() rounds the result back. hardtanh (and relu6)
widens BF16 to F32, since ggml-cpu clamps only F32 and F16; F16 stays one
native ggml_clamp, as in llama.cpp.

Rounding half node results at set() left these lowerings refusing (layer_norm)
or aborting (BF16 hardtanh) on half inputs that F32-computed lowerings feed.

Authored with assistance from Claude and Codex.

Differential Revision: D133480458

Pull Request resolved: #25368
meta-codesync Bot pushed a commit that referenced this pull request Nov 20, 2026
…cases

Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom):
* #25381
* #25380
* #25379
* #25378
* #25377
* #25376
* #25375
* #25374
* #25373
* #25372
* #25371
* #25370
* __->__ #25369
* #25368

test_ggml_ops_cuda and test_ggml_ops_hip run as bundles of 40 cases, so
their 165 cases take about 5 test actions instead of one action per case.
The CPU variant is unchanged.

Each unbundled case paid ~19 s of torch/transformers import for ~3 s of
test, so the GPU suites ran past their CI time limit. Nothing hangs or fails.

Authored with assistance from Claude and Codex.

Differential Revision: D133480459

Pull Request resolved: #25369
meta-codesync Bot pushed a commit that referenced this pull request Nov 20, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom):
* #25381
* #25380
* #25379
* #25378
* #25377
* #25376
* #25375
* #25374
* #25373
* #25372
* #25371
* __->__ #25370
* #25369
* #25368

run_hf_llm_ggml and ggml_ptn_runner take their engine flags (--device,
--device_index, --cpu_threads, --max_cached_graphs, --print_graph_ops) from one
GgmlEngineFlags library, and the README gains a table of the engine options
that change numerics.

Both runners then accept the same flags with the same meaning and help, and a
later option is added and documented once.

Authored with assistance from Claude and Codex.

Differential Revision: D133480460

Pull Request resolved: #25370

This branch was previously deployed

1 inactive deployment
cadence — f444be7e Deployed Nov 20, 2026 by digantdesai via hifi-op-test / hifi4 #39750
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.

3 participants