Merge pull request #1749 from wong00/fix-flashattn3-attention-compute

[bugfix] Fixed the logic of computing attention in flashAttention3.
This commit is contained in:
Jukka Seppänen
2025-12-10 11:52:18 +02:00
committed by GitHub
+1 -1
View File
@@ -66,7 +66,7 @@ else:
0, dtype=torch.int32).to(q.device, non_blocking=True),
seqused_q=None, seqused_k=None, max_seqlen_q=lq, max_seqlen_k=lk,
softmax_scale=softmax_scale, causal=causal,
deterministic=deterministic)[0].unflatten(0, (b, lq))
deterministic=deterministic).unflatten(0, (b, lq))
else:
assert FLASH_ATTN_2_AVAILABLE
x = flash_attn.flash_attn_varlen_func(q=q, k=k, v=v,