Skip to content

[executorch][native] Record embedding op samples - #24974

Open
digantdesai wants to merge 2 commits into
gh/digantdesai/203/basefrom
gh/digantdesai/203/head
Open

digantdesai wants to merge 2 commits into
gh/digantdesai/203/basefrom
gh/digantdesai/203/head

Conversation

@digantdesai

@digantdesai digantdesai commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Embedding becomes the second op in the op samples, with a case module like linear's: the backend test suite's embedding models, LLM vocabulary and token shapes, leading batch dims, a scalar index, the first and last rows, int32 indices, padding_idx, one table per GGUF super-scale family, and dynamic token and batch dims. It fits the float, int4 weight-only and GGUF schemes.

draws and chain take a sampler, standard normal by default, so a case can draw integer indices. Parallel moves to cases.py for both ops, and its modules are now branches, which renames the constants of linear's scale_families packages; their values are unchanged. Only weight-only packages with an nn.Linear in a model that fits the scheme get golden-int8_act, because without one it would repeat golden; Scheme.adds_int8_act decides this from the modules int8_activations quantizes.

The native test workflow (test-native.yml) and the CMake sample rule now also depend on the backend test suite's test_embedding.py, so a change there rebuilds and retests the samples, as test_linear.py already does.

A new ggml-CPU sample test, ggml_sample_test_no_linear in Buck and native_ggml_sample_test_no_linear in CTest and the OSS ggml job, judges every op but linear without activation quantization, so CI also covers embedding on plain ggml-CPU. Linear keeps only the act_quant test.

Authored with Claude Code.

Differential Revision: D130869556

NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 4 Unrelated Failures

As of commit 481858c with merge base fcc9575 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs 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.

@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]

This branch was previously deployed

1 inactive deployment
cadence — 481858cb Deployed Nov 13, 2026 by digantdesai via hifi-op-test / hifi4 #38186
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