You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add fusion rules to support the optimization of Whisper models.
Fusions added:
- Basic Fusions:
* additional pattern for erfgelu [moved to #2222]
- SkipLayerNorm:
* #2259
* Fusion patterns where skip_sum is also an output
* Bias + SkipLayerNorm -> SkipLayerNorm (with bias) [moved to #2222]
- BiasGelu Fusion [moved to #2222]
- SDPA:
* Support for pattern where only q is pre-scaled
- MHA:
* Patterns with/without past/present keys/values
* Patterns with non-rotary embeddings
* Patterns with/without mask
* Patterns with cross-attention (only for past key/value patterns)
- MHA Bias Fusion:
* Bias was offloaded to Attention fusion previously, this fusion fixes
that
- Attention:
* Patterns where Q, K and V do not come from slicing
TODO:
- [x] Fix SDPA singular prescale case, due to lost shape information
- [x] - Enable check conditions when #2210 is merged
- [x] - Improve/Rewrite whisper model test case to be similar to that of
smollm (for eg)
- [x] - Fix failing test cases to account for new patterns
- [x] - Add isolated test cases for new fusions like BiasGelu,
SkipLayerNorm etc
0 commit comments