Skip to content

[executorch][cuda] Let CudaExecutor honor a program's prefill lower bound - #23372

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

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

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Muse Glimmer's quantized linears switch kernels at M <= 4 (the int4/5/6/8
dispatch in backends/cuda/quantize_op_dispatch). A prefill with a symbolic
token count therefore only traces for T >= 5, and the selected-logits rows
feeding the LM head for K >= 5. This is why the single-sequence MG export
starts its dynamic method at 5.

CudaExecutor now reads the optional get_min_prefill_chunk constant (the name
the MG export already uses; default 2):

  • plan_slices takes it as the prefill lower bound, so slices narrower than it
    run as that many decode forwards;
  • a prefill slice selecting fewer rows than the bound pads its selector by
    repeating the last row, and the padded rows are ignored.

create() refuses a bound outside [2, W].

Differential Revision: D123051483

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 6 New Failures, 3 Unclassified Failures

As of commit a0a7329 with merge base c16dd0a (image):

NEW FAILURES - The following jobs have 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.

@github-actions

github-actions Bot commented Oct 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 Oct 2, 2026

This branch was successfully deployed

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