Repository navigation
[executorch][muse] Export vision with the CUDA batching contract - #24064
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24064
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (1 Unrelated Failure), 1 Unclassified FailureAs of commit 3472428 with merge base 5e8d11b ( 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:
BROKEN TRUNK - The following job 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. |
This PR needs a
|
…ckends Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #24076 * #24107 * #24075 * #24074 * #24073 * #24072 * #24066 * #24065 * #24064 * #24063 * __->__ #24062 Move the MLX executor's EngineEmbeddings (vision encoder + embed_text + MuseGlimmerMaterializer) into runtime/model_embeddings so the CUDA batching executors can materialize prepared image inputs the same way. MLX behavior is unchanged; it now holds a MuseGlimmerModelEmbeddings. Differential Revision: D125987290 Pull Request resolved: #24062
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #24076 * #24107 * #24075 * #24074 * #24073 * #24072 * #24066 * #24065 * #24064 * __->__ #24063 * #24062 Steps that carry a prepared (image) input run forward_from_embeddings with the materialized rows; token-only steps keep the static forward_{N} methods and their CUDA graphs. SessionTable packs prepared rows as placeholders so the cache still plans their positions. Differential Revision: D125987291 Pull Request resolved: #24063
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #24076 * #24107 * #24075 * #24074 * #24073 * #24072 * #24066 * __->__ #24065 * #24064 * #24063 * #24062 The CUDA backend factory builds the image preparation spec from the shared embeddings engine, and serve_batching passes --pos-embed-path through, so image requests are served on regular CUDA batching. Differential Revision: D125987293 Pull Request resolved: #24065
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #24076 * #24107 * #24075 * #24074 * #24073 * #24072 * __->__ #24066 * #24065 * #24064 * #24063 * #24062 The CUDA DFlash executor accepts prepared image inputs on admission; image steps run the target from embeddings, then hidden taps and drafting proceed as for tokens. Differential Revision: D125987295 Pull Request resolved: #24066
) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #24064 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/87/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/87/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/86/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/87/orig Differential Revision: [D125987292](https://our.internmc.facebook.com/intern/diff/D125987292/) @diff-train-skip-merge Co-authored-by: gasoonjia <gasoonjia@icloud.com>
Stack from ghstack (oldest at bottom):
export_cuda_batching optionally adds vision_encoder, embed_text and a dynamic
forward_from_embeddings over the same off-graph KV contract, and writes
pos_embed.bin next to the program.
Differential Revision: D125987292