Whisper chanegs#5
Open
anujj wants to merge 15 commits into
Open
Conversation
- Refactor CreateAndInitializeAttentionMask to use GPU-only initialization for TRT-RTX with static buffer (matches LLM pattern in position_inputs.cpp): * Zero entire mask on GPU instead of initializing on CPU * Copy only valid portion from CPU to GPU (not full max_length buffer) - Add asserts in UpdateAttentionMask to verify GPU path always succeeds for TRT-RTX EP, eliminating CPU fallback code path - Remove per-token CPU-GPU transfers that were causing performance regression Performance improvement (TRT-RTX EP): - Per-token latency: 3.18ms -> 2.38ms (25% faster) - Generation throughput: 313 -> 419 tokens/sec (34% faster) - E2E throughput: 139 -> 175 tokens/sec (26% faster)
Add defensive asserts to all fallback/unused code paths in Whisper attention mask handling to guarantee only the ideal GPU path executes when running with TRT-RTX EP and past_present_share_buffer=true. Asserts added to: - CreateAndInitializeAttentionMask: non-TRT-RTX GPU and CPU paths - UpdateAttentionMaskStaticImpl: CPU fallback (never called for TRT-RTX) - UpdateAttentionMaskDynamicImpl: CPU fallback (never called for TRT-RTX) - UpdateAttentionMask: dynamic mode path (TRT-RTX uses static mode) These asserts catch any unexpected code path execution during testing while having zero runtime cost in release builds.
…path, remove obsolete fallback helpers, fix beam prefill position_ids shape/update behavior, and document that Cursor agent signatures must not be added to commit messages.
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.
No description provided.