Commit Graph

901 Commits

Author SHA1 Message Date
911a80e721 D1.3: Fix tOrP0 for SMEM-P - skip make_tensor when offset is 0
CuTeDSL doesn't support OpResult + int. When offset is 0 (SMEM-P),
just use tOrP directly.
2026-05-23 21:03:00 +00:00
295e5a8c2f D1.3: Fix tOrP0 offset - scale FP32 columns to BF16 elements
tmem_p0_offset is in FP32 columns, but tOrP uses BF16 elements.
Offset = p0_offset * (32/16) = p0_offset * 2.
2026-05-23 21:02:04 +00:00
f3f2ab4b50 D1.3: Fix CuTeDSL scoping - define tOrP0 unconditionally with p0 offset 2026-05-23 21:01:18 +00:00
27f336ad54 D1.3: Fix critical bug - add TMEM column offset for P0 in PV GEMM
The softmax warps store P at tmem_p0_offset=32. PV MMA must read from
the same offset. tOrP0 was missing the offset, causing PV to read from
TMEM column 0 (where S is) instead of column 32 (where P is).
This was the root cause of NaN/zeros in D1 tests.
2026-05-23 21:00:29 +00:00
71c70e688f D1.3: Revert to d1.3-pre-sm100-helpers baseline for testing 2026-05-23 20:58:06 +00:00
36f49e574c D1.3: DIAGNOSTIC - test epilogue_tma_store raw PV without any round-trips 2026-05-23 20:57:13 +00:00
9e158dfc9f D1.3: Remove NO-OP round-trip, keep normalize + epilogue_tma_store 2026-05-23 20:56:13 +00:00
2e7fdf3a08 D1.3: Full correction_epilog with TMA store, normalize in reg before SMEM write
One-way trip: TMEM->reg (normalize) ->SMEM->GMEM
Replicates epilogue_tma_store logic with normalize step added
Uses CUTLASS helpers for correct layout handling
2026-05-23 20:54:23 +00:00
b05ff9deb4 D1.3: Apply transform_partitioned_tensor_layout before epilogue helpers 2026-05-23 20:52:42 +00:00
dced6fa11e D1.3: Replace NO-op TMEM round-trip with correction_epilog using epilogue_tmem_copy_and_partition + epilogue_smem_copy_and_partition
- Remove hand-constructed TMEM round-trips (3% layout mismatch error)
- Use CUTLASS get_tmem_load_op + get_smem_store_op paired atoms
- One-way trip: TMEM -> reg (normalize) -> SMEM -> GMEM
- SMEM-P path: zero-fill stub (proper copy TBD)
- Keep per-tile O rescale atoms for n>128 support
2026-05-23 20:50:23 +00:00
e677bf7833 SMEM-P: test permutation 4 (swap m↔n2) 2026-05-23 20:20:07 +00:00
c88ca96139 SMEM-P: add iterator offset debug print 2026-05-23 20:19:22 +00:00
6629fe57cf SMEM-P: add tCrP debug print, reset permute to 0 2026-05-23 20:14:32 +00:00
3bbc9a5a86 SMEM-P: test permutation 1 (swap m↔n0) 2026-05-23 20:14:21 +00:00
e2514f292c auto: pre-test commit 2026-05-23 20:13:47 +00:00
67e8d6dc70 SMEM-P: add debug_permute flag for coordinate permutation testing 2026-05-23 20:13:44 +00:00
be67295b71 SMEM-P: disable debug flags, revert to original mapping 2026-05-23 20:12:26 +00:00
4d428c6619 SMEM-P: fix scoping error, disable debug_p_one, enable debug_swap_mn 2026-05-23 20:11:50 +00:00
afa4b8a746 SMEM-P: add debug_swap_mn flag to test swapped coordinate mapping 2026-05-23 20:10:39 +00:00
aac08b57c4 SMEM-P: add debug_p_one flag to write constant P=1.0 2026-05-23 20:09:47 +00:00
dd0079b9dc auto: pre-test commit 2026-05-23 20:08:31 +00:00
0bcdfa1dc9 SMEM-P: implement two-phase softmax with normalization before SMEM write 2026-05-23 20:08:29 +00:00
e4e63b0331 Revert TMEM layout change (caused error) 2026-05-23 20:07:02 +00:00
b450a82b4c SMEM-P: try using PV A-operand layout directly for TMEM-P 2026-05-23 20:06:23 +00:00
74b3cc041d SMEM-P: debug compute offset for known coordinate 2026-05-23 20:05:02 +00:00
5cfde8d3db SMEM-P: add crd2idx debug attempt 2026-05-23 20:04:28 +00:00
98e0428840 SMEM-P: test pattern based on fragment indices (k,j) 2026-05-23 20:03:22 +00:00
a713cf55b4 auto: pre-test commit 2026-05-23 20:02:35 +00:00
8ca07722ae SMEM-P: add shape debug prints 2026-05-23 20:02:32 +00:00
d008505330 SMEM-P: add debug prints for coordinates 2026-05-23 20:00:33 +00:00
638e8b862b SMEM-P: implement CUTLASS LLM fixes - dynamic frg_tile, local coordinate conversion 2026-05-23 19:59:52 +00:00
a5dd6903ab auto: pre-test commit 2026-05-23 19:53:45 +00:00
f9f1381030 SMEM-P: try transposed mapping (swap m/n) 2026-05-23 19:53:42 +00:00
eb8084bb5f SMEM-P: current state - working but mapping wrong (cos 0.02) 2026-05-23 19:53:25 +00:00
ebd086bc88 SMEM-P: debug with linear index pattern m*128+n 2026-05-23 19:52:46 +00:00
07973f88ab SMEM-P: debug with test pattern (k+j)*0.01 2026-05-23 19:52:02 +00:00
90c62d0aac SMEM-P: fix coordinate access - qk_coord is (m,n) not ((m,n),0,0) 2026-05-23 19:38:11 +00:00
b78b7f7a71 SMEM-P: fix scoping - define tTMEM_LOADcS_frg unconditionally 2026-05-23 19:37:34 +00:00
1555384928 auto: pre-test commit 2026-05-23 19:36:58 +00:00
3fe7634643 SMEM-P: implement full 128-value write in softmax loop using coordinate mapping 2026-05-23 19:36:56 +00:00
9378df9e05 SMEM-P: fix BF16 value creation (use constant) 2026-05-23 19:33:29 +00:00
d4522e1245 SMEM-P: implement CUTLASS LLM coordinate mapping pattern (minimal test) 2026-05-23 19:32:11 +00:00
59b086451c SMEM-P: fix thread_idx tuple access 2026-05-23 19:30:09 +00:00
17b91ab3d3 auto: pre-test commit 2026-05-23 19:29:29 +00:00
e0252025fd SMEM-P: add debug to understand thread partitioning 2026-05-23 19:29:27 +00:00
e3b2cbeaed Update STAGE_D.md: manual SMEM addressing blocked on layout mapping 2026-05-23 19:22:28 +00:00
5ddaea6dad SMEM-P: implement simple test pattern instead of coord lookup 2026-05-23 19:21:31 +00:00
fc3e9bf0ae auto: pre-test commit 2026-05-23 19:20:42 +00:00
97c04eab63 Start implementing manual SMEM-P addressing (helpers are a trap) 2026-05-23 19:20:40 +00:00
d4bdc70134 Implement manual SMEM-P copy instead of cute.copy (helpers are a trap) 2026-05-23 19:14:44 +00:00