metal : fix array initialization

This commit is contained in:
Georgi Gerganov 2024-01-30 21:45:32 +02:00
parent 5fcb9c1c5a
commit d073e4f933
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -2084,8 +2084,8 @@ kernel void kernel_flash_attn_ext_f16(
threadgroup_barrier(mem_flags::mem_threadgroup);
{
half S[Q] = { 0.0h };
half M[Q] = { -INFINITY };
half S[Q] = { [0 ... Q-1] = 0.0h };
half M[Q] = { [0 ... Q-1] = -INFINITY };
// assume K and V are same shape
const int64_t ne22 = ne12;