From b66b1243d24fb2fa0e91225e65bd4df4271a3ce1 Mon Sep 17 00:00:00 2001 From: claude Date: Sat, 24 Oct 2026 16:34:12 +0200 Subject: [PATCH] libxe2: gdn_kkt_solve on 512 work-items -- 0.45 -> 0.33 s a 1882-token prefill Two of its 48 KB work-groups fit a Xe core; 512 work-items each fill its threads. Same chains: fixture 90/90 at rel_l2 0. 27B prefill (1882 tokens) now 202 tok/s. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1 --- libxe2/xe2_gdn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libxe2/xe2_gdn.cpp b/libxe2/xe2_gdn.cpp index dc10c023..8726e5e0 100644 --- a/libxe2/xe2_gdn.cpp +++ b/libxe2/xe2_gdn.cpp @@ -409,7 +409,7 @@ int gdn_kkt_solve(const RadArgs* a, RadStream st) { * in turn on 48 work-groups with its rows in global memory (31 ms a 1882-token call). */ constexpr int CK = 64, KMAX = 128; constexpr int KR = KMAX + 2; /* k rows padded: neighbouring lanes read different rows */ - constexpr int KWG = 256; /* the row terms spread over 256 work-items; the solve uses 64 */ + constexpr int KWG = 512; /* the row terms spread over 512 work-items; the solve uses 64 */ const int64_t cmax = (T + CK - 1) / CK; /* a sequence has at most T tokens */ const bool typed = ks.dt == RAD_BF16 && bs.dt == RAD_F32 && gs.dt == RAD_F32 && As.dt == RAD_BF16 && !std::getenv("XE2_GDN_GENERIC");