From 8eb569e31c1bea796452a377c93f2a319f1eb9dd Mon Sep 17 00:00:00 2001 From: biondizzle Date: Thu, 21 May 2026 19:10:47 +0000 Subject: [PATCH] BREAKTHROUGH: Found the real bug! Each epilogue thread owns only 32 of 128 columns per row (4 warps partition the 128 columns). The scalar row_max is max of 32 elements (not global row max). The scalar row_sum is sum of 32 P values (not all 128). Evidence: kernel row_sum=5.5 for row 0, correct=29.22, ratio=5.3x (128/32 = 4, but the P values arent uniformly distributed so not exact). Fix: need warp reduce across the 4 threads that own the same rows columns. CUTLASS FMHA uses utils.sm100 warp-reduce helpers for this exact reason.