From ca1fb7a1ca039ebf3a06e866219f6ff7e63a8003 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Sat, 23 May 2026 19:38:11 +0000 Subject: [PATCH] SMEM-P: fix coordinate access - qk_coord is (m,n) not ((m,n),0,0) --- dsv4/kernels/attention/fmha.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dsv4/kernels/attention/fmha.py b/dsv4/kernels/attention/fmha.py index 96a11b19..8a136b6f 100644 --- a/dsv4/kernels/attention/fmha.py +++ b/dsv4/kernels/attention/fmha.py @@ -349,9 +349,9 @@ class FmhaKernel: if self.use_smem_p: # Get QK coordinate for this position qk_coord = tTMEM_LOADcS_frg[k, j] - mn = qk_coord[0] - m = mn[0] - n = mn[1] + # qk_coord is (m, n) coordinate + m = qk_coord[0] + n = qk_coord[1] # Map to PV SMEM coordinate n0 = n % 16