Skip to content

[executorch][native] Record op packages with bundled golden and precise samples - #24532

Closed
pytorchbot wants to merge 1 commit into
gh/digantdesai/183/origfrom
gh/digantdesai/184/orig
Closed

pytorchbot wants to merge 1 commit into
gh/digantdesai/183/origfrom
gh/digantdesai/184/orig

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #24357 by @digantdesai
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/digantdesai/184/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/digantdesai/184/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/digantdesai/183/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/digantdesai/184/orig

@diff-train-skip-merge

…se samples

Pull Request resolved: #24357

Engines need op-level reference data that doesn't depend on any engine or device. `op_samples` writes one .ptn per op and quantization scheme, bundling `golden` (eager) and `precise` (float64, weights dequantized, activations unquantized) samples over the same inputs. Linear is the first op. Schemes are float, int4wo g32/g128 and 8da4w g32/g128, each with f32, f16 and bf16 methods; int8 weight-only is left out because no native engine runs it. Linear cases are the backend test suite's models, reused through a stand-in runner, plus decode, prefill, large-K, bias-free leading-batch, outlier-channel and zero-row cases. With CMake, the `native_op_samples` target writes them; it is not in ALL, so a plain build never needs torch.

Ops and schemes are independent axes. An op is an `Op` in `ops()`, a function returning `Case`s plus the dtypes to record them in; a scheme is a `Scheme` in `schemes()` that decides which cases it fits, quantizes a model and decodes its weights. `generate` records every op under every scheme, one spawned process per package, and writes no package when a scheme fits none of an op's cases. `cases.py` holds the case type and the backend test suite adapter, `schemes.py` the quantization, and `record.py` the packaging, which knows neither torchao nor any op.

Authored with Claude Code.

@bypass-github-export-checks
@bypass-github-pytorch-ci-checks
@bypass-github-executorch-ci-checks
ghstack-source-id: 463657757
@exported-using-ghexport

Differential Revision: [D128254877](https://our.internmc.facebook.com/intern/diff/D128254877/)
@pytorch-bot

pytorch-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit 3502615 with merge base 0f8e096 (image):

NEW FAILURES - The following jobs have failed:

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

@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 3, 2026
@digantdesai

Copy link
Copy Markdown
Contributor

Landed on main via #24698.

@digantdesai digantdesai closed this Nov 5, 2026

This branch was previously deployed

1 inactive deployment
cadence — 35026156 Deployed Nov 3, 2026 by pytorchbot
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants