Skip to content

Make DMMHA kernel inside MHA optional for Whisper - #25166

Merged
kunal-vaishnavi merged 1 commit into
microsoft:mainfrom
kunal-vaishnavi:kvaishnavi/whisper-exclude-cache-indir
Jun 25, 2025
Merged

Make DMMHA kernel inside MHA optional for Whisper#25166
kunal-vaishnavi merged 1 commit into
microsoft:mainfrom
kunal-vaishnavi:kvaishnavi/whisper-exclude-cache-indir

Conversation

@kunal-vaishnavi

Copy link
Copy Markdown
Contributor

Description

This PR sets adding support for the DecoderMaskedMultiHeadAttention (DMMHA) kernel inside MultiHeadAttention (MHA) to false by default.

Motivation and Context

The models containing the extra inputs for DMMHA (i.e. past_sequence_length and cache_indirection) have some runtime issues. Additionally, not all execution providers implement the DMMHA kernel inside MHA and will therefore not support these extra inputs.

@baijumeswani baijumeswani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this impact perf on whisper cuda models?

@kunal-vaishnavi

Copy link
Copy Markdown
Contributor Author

Would this impact perf on whisper cuda models?

Yes, performance will be temporarily reduced for now. Once the DMMHA models are working with ONNX Runtime GenAI for word-level timestamps, the flag can be set to true by default.

@kunal-vaishnavi
kunal-vaishnavi merged commit 293a5ac into microsoft:main Jun 25, 2025
85 of 88 checks passed
ankus-qti pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Nov 25, 2025
### Description
This PR sets adding support for the `DecoderMaskedMultiHeadAttention`
(DMMHA) kernel inside `MultiHeadAttention` (MHA) to false by default.

### Motivation and Context
The models containing the extra inputs for DMMHA (i.e.
`past_sequence_length` and `cache_indirection`) have some runtime
issues. Additionally, not all execution providers implement the DMMHA
kernel inside MHA and will therefore not support these extra inputs.
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.

2 participants