diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-02 09:08:54 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:27:03 +0200 |
| commit | 8d412f8a225f3e337dac271ea2491ac3c1c099af (patch) | |
| tree | 6e43dd291c46f5b440d109f1967d5423c5dc84c9 /qwen_asr_kernels.h | |
| parent | 3f248b27a5482514f80deb687450dbd3a11d41b2 (diff) | |
| download | ffwd-8d412f8a225f3e337dac271ea2491ac3c1c099af.tar.gz ffwd-8d412f8a225f3e337dac271ea2491ac3c1c099af.zip | |
cpu: reuse tiled attention scratch buffers
Diffstat (limited to 'qwen_asr_kernels.h')
| -rw-r--r-- | qwen_asr_kernels.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qwen_asr_kernels.h b/qwen_asr_kernels.h index 92082f1..c32ec3a 100644 --- a/qwen_asr_kernels.h +++ b/qwen_asr_kernels.h @@ -150,6 +150,14 @@ void qwen_bidirectional_gqa_attention_packed(float *out, const float *Q, int n_heads, int n_kv_heads, int head_dim, float scale); +/* Optional reusable scratch for the BLAS-tiled packed attention path. */ +size_t qwen_bidirectional_gqa_attention_packed_scratch_bytes( + const int *offsets, int batch); +void qwen_bidirectional_gqa_attention_packed_with_scratch( + float *out, const float *Q, const float *K, const float *V, + const int *offsets, int batch, int n_heads, int n_kv_heads, + int head_dim, float scale, float *scratch, size_t scratch_bytes); + /* ======================================================================== * Position Embeddings * ======================================================================== */ |
