Skip to content

Support Whisper positional indexing (#23903) - #23903

Merged
JakeStevens merged 1 commit into
pytorch:mainfrom
JakeStevens:export-D125479769
Nov 3, 2026
Merged

JakeStevens merged 1 commit into
pytorch:mainfrom
JakeStevens:export-D125479769

Conversation

@JakeStevens

@JakeStevens JakeStevens commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Lower matrix row gathers from aten.index.Tensor through the existing embedding path and lower positive bounded aten.repeat shapes with ggml_repeat. Preserve snapshots when repeat aliases its input so later cache writes cannot change previously computed values.

Allow row-index validation to follow repeats and validate integer aten.arange.start_step bounds when building the graph. This supports Whisper's encoder position embeddings and decoder cache-position gathers while retaining input bounds checks on cached graph replay.

Review row-index validation and gather lowering first, then repeat lowering and the operator regressions.

Authored with assistance from Codex.

Differential Revision: D125479769

@pytorch-bot

pytorch-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit 3aa3427 with merge base a057bb4 (image):

BROKEN TRUNK - The following jobs 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.

@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 15, 2026
@meta-codesync

meta-codesync Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125479769.

@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.

@meta-codesync meta-codesync Bot changed the title Support Whisper positional indexing Support Whisper positional indexing (#23903) Nov 2, 2026
JakeStevens added a commit to JakeStevens/executorch that referenced this pull request Nov 2, 2026
Summary:

Lower matrix row gathers from `aten.index.Tensor` through the existing embedding path and lower positive bounded `aten.repeat` shapes with `ggml_repeat`. Preserve snapshots when repeat aliases its input so later cache writes cannot change previously computed values.

Allow row-index validation to follow repeats and validate integer `aten.arange.start_step` bounds when building the graph. This supports Whisper's encoder position embeddings and decoder cache-position gathers while retaining input bounds checks on cached graph replay.

Review row-index validation and gather lowering first, then repeat lowering and the operator regressions.

Authored with assistance from Codex.

Differential Revision: D125479769
JakeStevens added a commit to JakeStevens/executorch that referenced this pull request Nov 2, 2026
Summary:

Lower matrix row gathers from `aten.index.Tensor` through the existing embedding path and lower positive bounded `aten.repeat` shapes with `ggml_repeat`. Preserve snapshots when repeat aliases its input so later cache writes cannot change previously computed values.

Allow row-index validation to follow repeats and validate integer `aten.arange.start_step` bounds when building the graph. This supports Whisper's encoder position embeddings and decoder cache-position gathers while retaining input bounds checks on cached graph replay.

Review row-index validation and gather lowering first, then repeat lowering and the operator regressions.

Authored with assistance from Codex.

Differential Revision: D125479769
Summary:

Lower matrix row gathers from `aten.index.Tensor` through the existing embedding path and lower positive bounded `aten.repeat` shapes with `ggml_repeat`. Preserve snapshots when repeat aliases its input so later cache writes cannot change previously computed values.

Allow row-index validation to follow repeats and validate integer `aten.arange.start_step` bounds when building the graph. This supports Whisper's encoder position embeddings and decoder cache-position gathers while retaining input bounds checks on cached graph replay.

Review row-index validation and gather lowering first, then repeat lowering and the operator regressions.

Authored with assistance from Codex.

Differential Revision: D125479769
JakeStevens added a commit to JakeStevens/executorch that referenced this pull request Nov 3, 2026
Summary:

Lower matrix row gathers from `aten.index.Tensor` through the existing embedding path and lower positive bounded `aten.repeat` shapes with `ggml_repeat`. Preserve snapshots when repeat aliases its input so later cache writes cannot change previously computed values.

Allow row-index validation to follow repeats and validate integer `aten.arange.start_step` bounds when building the graph. This supports Whisper's encoder position embeddings and decoder cache-position gathers while retaining input bounds checks on cached graph replay.

Review row-index validation and gather lowering first, then repeat lowering and the operator regressions.

Authored with assistance from Codex.

Differential Revision: D125479769
@JakeStevens
JakeStevens merged commit d55e079 into pytorch:main Nov 3, 2026
232 of 234 checks passed
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.

2 participants