Repository navigation
Add Whisper runner under examples/audio (#23904) - #23904
JakeStevens wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23904
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 1 Unrelated Failure, 2 Unclassified FailuresAs of commit 789b93c with merge base a057bb4 ( 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:
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. |
|
@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125296073. |
This PR needs a
|
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: Add `run_whisper` to encode a raw fp32 log-mel window, project cross K/V once, prefill the forced prefix into the static KV cache, and greedily decode while advancing `cache_position`. Cross K/V input staging persists across executions. The default token budget is 32, matching the exporter, and is capped by remaining decoder context. A full-capacity prefix stays unchanged, and decoding stops without computing an unused token at the budget limit. `--expected` compares the complete ID sequence with eager vectors and returns exit 3 on mismatch. `EXECUTORCH_BUILD_NATIVE_AUDIO_RUNNER` builds and installs the runner with Native Vulkan. Audio and vision runners share gflags resolution and `runner_utils`; either option enables the examples directory. The README documents matching export/run token budgets, and the Vulkan TODO records future zero-copy chaining and attention-weight storage work. Token files and EOS lists reject partially numeric or invalid IDs with exit 1; comma-only EOS lists are rejected. Reference IDs are validated before executing the model. Integer parsing accepts surrounding whitespace and CRLF input. Authored with Claude Code; updated with Codex. Differential Revision: D125296073
278a455 to
789b93c
Compare
digantdesai
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary:
Add
run_whisperto encode a raw fp32 log-mel window, project cross K/V once, prefill the forced prefix into the static KV cache, and greedily decode while advancingcache_position. Cross K/V input staging persists across executions. The default token budget is 32, matching the exporter, and is capped by remaining decoder context. A full-capacity prefix stays unchanged, and decoding stops without computing an unused token at the budget limit.--expectedcompares the complete ID sequence with eager vectors and returns exit 3 on mismatch.EXECUTORCH_BUILD_NATIVE_AUDIO_RUNNERbuilds and installs the runner with Native Vulkan. Audio and vision runners share gflags resolution andrunner_utils; either option enables the examples directory. The README documents matching export/run token budgets, and the Vulkan TODO records future zero-copy chaining and attention-weight storage work.Token files and EOS lists reject partially numeric or invalid IDs with exit 1; comma-only EOS lists are rejected. Reference IDs are validated before executing the model. Integer parsing accepts surrounding whitespace and CRLF input.
Authored with Claude Code; updated with Codex.
Differential Revision: D125296073