From 77e1dd777ac2b5cd4eefc6edca519a8b545f3f58 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 12 Nov 2026 02:47:03 +0100 Subject: [PATCH] tools: cuda_spill_guard lists the Qwen3.6 copy of the fused prompt kernels (fused_q36::native_kernel) moe_fused_iq_q36.cu compiles moe_fused_iq.cu a second time in namespace strata::prefill::fused_q36, so every native_kernel instance of the original exists again under a name the ALLOWED table did not carry, and an unlisted kernel fails with any stack. On the integrated head the guard reported 10 of them on sm_120 (STACK 8-16 B, LOCAL 0). Same source and instance parameters, same register cap: an instance has the same STACK as its fused:: twin in 24 of 25 cases on sm_86 and in 7 of 10 on sm_120 (never more than 8 B apart); no per-thread array was found. One entry, the measured maximum over the 62 instances: sm_120 (16, 0) on CUDA 13.2 (l620), sm_86 (80, 0) read with cuobjdump 12.9 on CUDA 13.0 objects (z440). The K-quant down instances of the last commit (<13 / 14, false, 2 / 4, 512>) read 8 / 8 / 0 / 0 B on sm_120 and 72 / 72 / 64 / 64 B on sm_86 and are inside it. cuda_spill_guard still reports violations that are not this copy's, on the base too: tp_band_kernel and 8 iq4_w4a8_kernel instances on sm_120; 3 gemm_rows_kernel, rope_table_inv_kernel, 7 iq4_w4a8_kernel and 6 fused:: K-quant gate/up instances (<12 / 13 / 14, true>, 56-80 B against 48) on sm_86. Not touched here. --- tools/check_cuda_spills.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/check_cuda_spills.py b/tools/check_cuda_spills.py index e9e9af6019..9774bc797c 100644 --- a/tools/check_cuda_spills.py +++ b/tools/check_cuda_spills.py @@ -161,6 +161,11 @@ ALLOWED = { # spill 36 / 52 (sm_86), 32 / 32 (sm_120) at the 128-register cap of __launch_bounds__(THREADS = 512, 1); its q[8] # / raw[5] / bq[4] / a[4] / d[4] stay in registers "strata::prefill::fused::{anonymous}::native_kernel": {"sm_120": (32, 0), "sm_86": (32, 0)}, + # the Qwen3.6 copy of the same kernels (moe_fused_iq_q36.cu includes moe_fused_iq.cu with the shape override and its namespace renamed): same source and + # instance parameters, so the same spill under the same register cap, no per-thread array found (an instance has the same STACK as its fused:: twin in 24 of 25 cases on + # sm_86 and 7 of 10 on sm_120, never more than 8 B apart). Measured on f-p4-q36 7bc09fadf, CUDA 13.2 sm_120 (l620) and CUDA 12.9 + # cuobjdump on CUDA 13.0 objects for sm_86 (z440): the maximum over 62 instances, which include the K-quant down instances <13 / 14, false, 2 / 4, 512> + "strata::prefill::fused_q36::{anonymous}::native_kernel": {"sm_120": (16, 0), "sm_86": (80, 0)}, # float x[GRW_PER] (GRW_PER = 10): the thread's rows for the norm (no spill) "strata::prefill::{anonymous}::gr_write_cvec_norm_rs_kernel": {"sm_86": (40, 0)}, # float v[GRW_PER] (GRW_PER = 10): the thread's rows for the norm (no spill)