Skip to content

[executorch][muse] Run the MG batching runtime on CudaExecutor - #24007

Merged
Gasoonjia merged 1 commit into
gh/Gasoonjia/46/origfrom
gh/Gasoonjia/47/orig
Oct 20, 2026
Merged

Gasoonjia merged 1 commit into
gh/Gasoonjia/46/origfrom
gh/Gasoonjia/47/orig

Conversation

@Gasoonjia

Copy link
Copy Markdown
Contributor

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #23731 by @Gasoonjia
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/47/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/47/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/46/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/47/orig
Differential Revision: D124871959
@diff-train-skip-merge

Pull Request resolved: #23731

The batching runner and multiplexed worker use the same ServingRuntime, Runner and DecodeFirstScheduler stack on CUDA and MLX; only the executor differs.

CudaExecutorConfig now provides model/external-data loading, load mode, session limits, KV dtype, initial pool capacity and backend options to CudaExecutor::create(config). The existing module-based overload remains supported. Both entry points share metadata validation, forward-method discovery, cache construction and graph/weight-sharing setup. A zero config token limit divides the cell pool across resident sessions after reserving its padding row, capped by the published context.

The existing Muse backend adapter calls this reusable API and retains only Muse-specific vocabulary/BOS validation and text-only preparation. Remove the separate CUDA backend factory files. Image requests remain rejected for CUDA batching artifacts without a vision path.

CMake batching runner/preparation-test targets accept CUDA or MLX, and the CUDA make target builds the shared serving integration. Configuration tests cover automatic and explicit limits, greedy generation parity and invalid/overcommitted configurations.
ghstack-source-id: 451855080
@exported-using-ghexport

Differential Revision: [D124871959](https://our.internmc.facebook.com/intern/diff/D124871959/)
@pytorch-bot

pytorch-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 225 Pending

As of commit b4fbe74 with merge base 897d28f (image):
💚 Looks good so far! There are no failures yet. 💚

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 20, 2026
@Gasoonjia
Gasoonjia added this pull request to stack #24012 October 20, 2026 03:42
@Gasoonjia
Gasoonjia merged commit 83d9bc2 into main Oct 20, 2026
299 of 310 checks passed
@Gasoonjia
Gasoonjia deleted the gh/Gasoonjia/47/orig branch October 20, 2026 03:43
@Gasoonjia
Gasoonjia deployed to upload-benchmark-results October 20, 2026 08:12 — with GitHub Actions Active

This branch was successfully deployed

2 active deployments
upload-benchmark-results — b4fbe74c Deployed Oct 20, 2026 by Gasoonjia via upload-benchmark-results #21104
cadence — b4fbe74c Deployed Oct 20, 2026 by Gasoonjia via hifi-op-test / hifi4 #34139
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants