Skip to content

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

Open
digantdesai wants to merge 3 commits into
gh/digantdesai/184/basefrom
gh/digantdesai/184/head
Open

digantdesai wants to merge 3 commits into
gh/digantdesai/184/basefrom
gh/digantdesai/184/head

Conversation

@digantdesai

@digantdesai digantdesai commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

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 Cases 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
@exported-using-ghexport

Differential Revision: D128254877

Differential Revision: D128254877

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 4 Unclassified Failures

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

NEW FAILURE - The following job has failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

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 Oct 30, 2026
@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.

This was referenced Oct 30, 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.

[ghstack-poisoned]
[ghstack-poisoned]

This branch was previously deployed

1 inactive deployment
cadence — 4b89ceb1 Deployed Nov 3, 2026 by digantdesai via hifi-op-test / hifi4 #36236
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