std :: ml::gpu_mps
Function std::mps_linear_attn_state_bytes
unsigned long mps_linear_attn_state_bytes(unsigned long numHeads, unsigned long headDim)Size of a linear-attention state: numHeads * (headDim^2 + headDim) floats (per head, S^T as [headDim][headDim] then z).