Repository navigation
Enable XNNPACK re-inplace by default for faster Whisper Tiny - #254
Draft
JakeStevens wants to merge 1 commit into
Draft
JakeStevens wants to merge 1 commit into
JakeStevens wants to merge 1 commit into
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable the re-inplace pass by default for the Optimum XNNPACK export recipe. Callers can still A/B or opt out with
recipe_kwargs={"run_reinplace_pass": False}. The pass currently rewrites eligibleindex_putcalls.Whisper Tiny A/B
Exported
openai/whisper-tinytwice from the same Optimum revision using the local ExecuTorch source containing the output-liveness fix: re-inplace disabled vs enabled. With the 30-second trimmed audio sample used bytests/models/test_modeling_whisper.py, FP32 and four CPU threads, timed full transcription (encoder plus autoregressive decoder) after one warmup per artifact. Each variant had three measured runs; times exclude export, model loading and feature extraction.This is 3.93x faster (74.6% lower median latency) on this host. The decoder changed from 16
aten::index_put.outinstructions to 16aten::index_put_instructions. All runs produced the same 433-character transcript (SHA-2560c9c4e433d2d0df6e3b034b8462e8ab8b018f967125c6ccd9065e53b2d55b5f6). As a control, off/on exports of SmolLM2-135M and Qwen2.5-0.5B with custom KV cache produced byte-identical PTE files; their cache updates usellama::update_cache, so this pass does not change those models.Validation: the existing Whisper Tiny export/transcription integration test passed with the new default; Black, Ruff, and git diff --check passed.
Merge dependency
Draft until pytorch/executorch#23488 is merged and available to supported ExecuTorch versions. That PR fixes output liveness: without it, re-inplace can change a returned original tensor. The current
executorch>=1.0.0dependency does not ensure that fix is present, so before merging this PR we must raise the minimum version to a release containing the fix or add a reliable compatibility guard.Authored with assistance from Codex (OpenAI AI assistant).