Skip to content

[executorch][muse-glimmer] Bound the CUDA prefill logits selector by the sampler rows - #24107

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

Gasoonjia wants to merge 1 commit into
gh/Gasoonjia/95/basefrom
gh/Gasoonjia/95/head

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

forward_others and forward_from_embeddings take up to max_step_tokens
(4096) tokens and select which rows' logits to return. The selector's dynamic
bound was also max_step_tokens, so memory planning sized each method's FP32
logits output at 4096 x 202048 x 4 B = 3157 MiB, allocated at load whether or
not a request ever uses it.

A step never selects more rows than the device samplers take
(MAX_SAMPLE_ROWS = 64: one row per prefilling session, or max_owners x block for DFlash verify), and the executor already rejects a step with more.
Bound the selector at min(max_step_tokens, MAX_SAMPLE_ROWS). Each planned
logits output drops to 49 MiB; token width and the DFlash taps keep their
max_step_tokens bound.

Differential Revision: D127114350

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 2 New Failures, 1 Unclassified Failure

As of commit dedcd5f with merge base 2c3e231 (image):

NEW FAILURES - The following jobs have failed:

  • pull / unittest / macos / macos-job (gh)
    examples/models/muse-glimmer/tests/test_cuda_sequence_export_inputs.py::SequenceExportInputsTest::test_small_logits_example_preserves_token_and_embedding_capacity
  • pull / unittest-editable / macos / macos-job (gh)
    examples/models/muse-glimmer/tests/test_cuda_sequence_export_inputs.py::SequenceExportInputsTest::test_small_logits_example_preserves_token_and_embedding_capacity

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

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.

This branch was successfully deployed

1 active deployment
cadence — dedcd5f1 Deployed Oct 23, 2026 by Gasoonjia via hifi-op-test / hifi4 #34459
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