Skip to content

[executorch][muse-glimmer] Add CUDA speculative sampling orchestration - #22491

Open
Gasoonjia wants to merge 1 commit into
gh/Gasoonjia/14/basefrom
gh/Gasoonjia/14/head
Open

[executorch][muse-glimmer] Add CUDA speculative sampling orchestration#22491
Gasoonjia wants to merge 1 commit into
gh/Gasoonjia/14/basefrom
gh/Gasoonjia/14/head

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Add the CUDA counterparts of the DFlash verification step. stochastic_speculative_sample walks the candidate block on device using already normalized target and draft probability rows, applies the host acceptance rule, and falls back to residual or excluded-token correction on the first rejection, while greedy_speculative_sample compares committed argmax tokens without touching probabilities. Both return the committed candidate count and correction token as device-resident scalars so the decode loop never needs the full probability rows on the host.

Differential Revision: D117826289

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 4a46bb3 with merge base c65ad53 (image):

NEW FAILURE - The following job has failed:

  • Lint / lintrunner (gh)
    >>> Lint for examples/models/muse-glimmer/tests/sampling_cuda_test.cpp:

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

@github-actions

github-actions Bot commented Sep 2, 2026

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 Sep 2, 2026
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.

1 participant