Skip to content

Qwen 3.5 MoE Metal: Use max-sized prefill example for dynamic inputs#18956

Merged
manuelcandales merged 79 commits intomainfrom
gh/manuelcandales/177/head
Apr 21, 2026
Merged

Qwen 3.5 MoE Metal: Use max-sized prefill example for dynamic inputs#18956
manuelcandales merged 79 commits intomainfrom
gh/manuelcandales/177/head

Conversation

@manuelcandales
Copy link
Copy Markdown
Contributor

With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 16, 2026

🔗 Helpful Links

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

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

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 Apr 16, 2026
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 20, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 0efb42f
ghstack-comment-id: 4263712315
Pull-Request: #18956
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 21, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 6dc014e
ghstack-comment-id: 4263712315
Pull-Request: #18956
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 21, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 601c7ed
ghstack-comment-id: 4263712315
Pull-Request: #18956
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 21, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 601c7ed
ghstack-comment-id: 4263712315
Pull-Request: #18956
[ghstack-poisoned]
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 21, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 601c7ed
ghstack-comment-id: 4263712315
Pull-Request: #18956
Base automatically changed from gh/manuelcandales/176/head to main April 21, 2026 18:49
[ghstack-poisoned]
manuelcandales added a commit that referenced this pull request Apr 21, 2026
With alloc_graph_input=False, ExecuTorch sets the input tensor's
numel_bound_ from the serialized example size. A small example (T=2)
prevents runtime inputs larger than 2 tokens. Use max_seq_len-1 as
the prefill example size so any prompt length is accepted at runtime.

Authored with Claude.


ghstack-source-id: 601c7ed
ghstack-comment-id: 4263712315
Pull-Request: #18956
@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.

@manuelcandales manuelcandales merged commit f13b783 into main Apr 21, 2026
182 of 188 checks passed
@manuelcandales manuelcandales deleted the gh/manuelcandales/177/head branch April 21, 2026 18:59
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