From e398de4cf68ffd0f43e0b1692b08b2726457fad4 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 18 Oct 2026 15:03:17 -0400 Subject: cuda-ab: ctaid_probe (CTA-coordinate + A-row reader) + GEO geometry print in transformer_mt The vGPU GR engine's failing chains are correct for the by=0 band and replicate one tile for rows >= 16 with the QMD geometry and the input recs proven clean, so the remaining hypothesis is engine-side CTA-coordinate behaviour. ctaid_probe reads it directly in two phases on the exact (16,4,1)/(16,16,1) geometry: Phase 1 coord_map writes by*10000+bx*100+ty*10+tx per element (int32 64x256) and reports per-band row0 plus a bad count - a collapsed or wrong CTAID.Y shows instantly. Phase 2 arow_read writes A[(by*16+ty)*256+(bx*16+tx)] with A[i]=i, so a correct engine reads each band's own rows; a collapsed row register reads one band's rows everywhere. transformer_mt prints its per-chain geometry (GEO lines) for the host-side GRID-WIT comparison. Runtime <10 s. Built with nvcc -O2 --cudart=static -arch=sm_75 (deterministic static runtime). --- tools/cuda-ab/transformer_mt.cu | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/cuda-ab/transformer_mt.cu') diff --git a/tools/cuda-ab/transformer_mt.cu b/tools/cuda-ab/transformer_mt.cu index ffd23aa..5cfe55e 100644 --- a/tools/cuda-ab/transformer_mt.cu +++ b/tools/cuda-ab/transformer_mt.cu @@ -142,6 +142,14 @@ static void launch_chain(cudaStream_t st, const float *x, struct attn_bufs b, dim3 g1(DH / TILE, SEQ / TILE); dim3 g2(SEQ / TILE, SEQ / TILE); dim3 tb(TILE, TILE); + static int chain_n; + + /* r226 GRID-WIT: the exact geometry every chain launch uses, so the + * host-side QMD geometry capture (GRID-WIT in vgsp) can be compared + * against what the client actually launched. Chains 0..2 are the + * multi-stream class, 3..7 the 5-launch loop. */ + printf("GEO chain=%d gemm_nn grid=(%u,%u,1) block=(%u,%u,1) gemm_nt grid=(%u,%u,1) softmax grid=(64,1,1) block=(64,1,1)\n", + chain_n++, g1.x, g1.y, tb.x, tb.y, g2.x, g2.y); gemm_nn<<>>(x, wq, b.q, SEQ, DH, DH); gemm_nn<<>>(x, wk, b.k, SEQ, DH, DH); -- cgit v1.2.3