Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion flash_attn/cute/flash_fwd_sm100.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ def _setup_attributes(self):
- Configures pipeline stages for softmax, correction, and epilogue operations
"""

self.kv_stage = 4 if self.q_dtype.width == 8 or self.q_stage == 1 else 3
self.kv_stage = (
4
if (self.q_dtype.width == 8 or self.q_stage == 1)
and self.head_dim_padded <= 128
and self.head_dim_v_padded <= 128
else 3
)
self.acc_stage = 1
# For hdim 192,128, we don't have enough smem to store all 3 stages of KV:
# 128 x 192 x 2 bytes x 3 stages = 144KB, and we need 96KB for Q.
Expand Down
Loading