Skip to content

Commit 8cee3d6

Browse files
justinchubyCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent 5f6d26d commit 8cee3d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/mobius/rewrite_rules/_group_query_attention.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
)
5151

5252
# CUDA EP's GroupQueryAttention kernel historically enforced MAX_HEAD_SIZE = 256.
53-
# Latest ORT (unreleased) supports head_dim=512 for Gemma4 full-attention layers.
54-
# The rewrite rule (Attention → GQA) still skips head_dim > 512 to avoid
55-
# generating nodes that would fail on older runtimes.
56-
_MAX_GQA_HEAD_DIM = 512
53+
# Keep the rewrite-rule limit conservative until GQA fusion is gated on a
54+
# runtime/EP capability check. This avoids emitting GroupQueryAttention nodes
55+
# with head_dim=512 that can still fail on released ORT builds.
56+
_MAX_GQA_HEAD_DIM = 256
5757

5858

5959
def _head_dim_exceeds_gqa_limit(past_key) -> int | None:

0 commit comments

Comments
 (0)