MCPcopy Create free account
hub / github.com/WaveSpeedAI/QuantumAttention / flash_attention

Function flash_attention

tests/test_interface.py:13–15  ·  view source on GitHub ↗
(query, key, value, is_causal=False)

Source from the content-addressed store, hash-verified

11
12
13def flash_attention(query, key, value, is_causal=False):
14 with sdpa_kernel(SDPBackend.FLASH_ATTENTION):
15 return F.scaled_dot_product_attention(query, key, value, is_causal=is_causal)
16
17
18def cudnn_sdpa(query, key, value, is_causal=False):

Callers 2

_test_attn_funcFunction · 0.85
fa_fnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected