[bugfix] Fixed the logic for processing return values after computing attention in flashAttention3
This commit is contained in:
@@ -66,7 +66,7 @@ else:
|
|||||||
0, dtype=torch.int32).to(q.device, non_blocking=True),
|
0, dtype=torch.int32).to(q.device, non_blocking=True),
|
||||||
seqused_q=None, seqused_k=None, max_seqlen_q=lq, max_seqlen_k=lk,
|
seqused_q=None, seqused_k=None, max_seqlen_q=lq, max_seqlen_k=lk,
|
||||||
softmax_scale=softmax_scale, causal=causal,
|
softmax_scale=softmax_scale, causal=causal,
|
||||||
deterministic=deterministic)[0].unflatten(0, (b, lq))
|
deterministic=deterministic).unflatten(0, (b, lq))
|
||||||
else:
|
else:
|
||||||
assert FLASH_ATTN_2_AVAILABLE
|
assert FLASH_ATTN_2_AVAILABLE
|
||||||
x = flash_attn.flash_attn_varlen_func(q=q, k=k, v=v,
|
x = flash_attn.flash_attn_varlen_func(q=q, k=k, v=v,
|
||||||
|
|||||||
Reference in New Issue
Block a user