Skip to content

Whisper chanegs#5

Open
anujj wants to merge 15 commits into
mainfrom
whisper_chanegs
Open

Whisper chanegs#5
anujj wants to merge 15 commits into
mainfrom
whisper_chanegs

Conversation

@anujj

@anujj anujj commented Feb 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

anujj and others added 15 commits January 20, 2026 21:10
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant