// File: gqa_bf16_contract.h
#pragma once
#include <cstdint>

// Harness contract for the llama.cpp (ggml) gqa baseline.
// Causal GQA. Called by armbench_entry_gqa (binding.cpp); implemented by
// kernel.cpp.
// Q is row-major bf16 [M, n_heads, head_dim]; K/V are row-major bf16
// [S, kv_heads, head_dim]; out is row-major fp32 [M, n_heads, head_dim].
// KV-cache-style causal softmax(Q.K^T * scale)*V per head, with K/V
// broadcast across each group of (n_heads / kv_heads) query heads: kv
// position s is visible to query position m iff s <= m + (S - M).
int armbench_llamacpp_gqa(const void* Q, const void* K, const void* V,
                          float* out, int64_t M, int64_t S,
                          int64_t n_heads, int64_t head_dim, int64_t kv_heads);