-
cd6d81fc4b
merge: resolve conflict (keep our version)
biondizzle
2026-05-24 02:44:09 +00:00
-
-
6a909e16d0
D1.5: Replace broken make_cotiled_copy SMEM-P with coordinate-indexed store
biondizzle
2026-05-24 02:43:42 +00:00
-
b67668d2bd
feat: SMEM-P with make_tiled_copy_tv + manual fill
biondizzle
2026-05-24 02:43:12 +00:00
-
fce9a7f4be
feat: SMEM-P using make_tiled_copy_tv + logical sP view
biondizzle
2026-05-24 02:42:20 +00:00
-
-
29231fc75e
Merge branch 'master' of ssh://sweetapi.com:2222/biondizzle/nvfp4-megamoe-kernel
biondizzle
2026-05-24 02:41:39 +00:00
-
-
3803847900
D1.5: Use tCtO_fake layout for epilogue_tma_store (needs STAGE dim)
biondizzle
2026-05-24 02:41:32 +00:00
-
688ca6f737
feat: SMEM-P using make_cotiled_copy (one-row-per-thread)
biondizzle
2026-05-24 02:40:38 +00:00
-
-
34db0bf802
D1.5: Remove duplicate tTMrO definition (keep unconditional one)
biondizzle
2026-05-24 02:40:40 +00:00
-
093de4e62f
merge
biondizzle
2026-05-24 02:40:14 +00:00
-
-
bb4c35facb
D1.5: Move tTMrO after O rescale atoms (fix tTMEM_LOADcO reference)
biondizzle
2026-05-24 02:39:18 +00:00
-
af8303ba64
fix: reorder tTMrO definition after tTMEM_LOADcO
biondizzle
2026-05-24 02:36:08 +00:00
-
e41cf07f50
fix: tTMrO scoping + restore SMEM-P coordinate write
biondizzle
2026-05-24 02:34:50 +00:00
-
-
bfd598b937
D1.5: Move tTMrO def before softmax loop (CuTeDSL scoping)
biondizzle
2026-05-24 02:32:39 +00:00
-
1e8f784bb0
debug: zero-fill sP to check deadlock
biondizzle
2026-05-24 02:31:10 +00:00
-
ece137b2c2
D1.5: Use proven Stage C approach - normalize via TMEM round-trip + epilogue_tma_store
biondizzle
2026-05-24 02:30:20 +00:00
-
8010e3dda2
test: add try/except for SMEM-P coord test
biondizzle
2026-05-24 02:15:07 +00:00
-
16bade9e10
test: use FmhaKernel for SMEM-P coord test
biondizzle
2026-05-24 01:59:25 +00:00
-
f2d95da4aa
test: SMEM-P coordinate verification test
biondizzle
2026-05-24 01:58:32 +00:00
-
394f08601a
fix: proper v_major from tensor
biondizzle
2026-05-24 01:55:37 +00:00
-
384de55dfd
fix: COL_MAJOR
biondizzle
2026-05-24 01:54:30 +00:00
-
313f2c77cd
fix: hardcode v_major for diag test
biondizzle
2026-05-24 01:54:20 +00:00
-
268265ba0b
diag: use FmhaKernel setup for cotiled test
biondizzle
2026-05-24 01:54:08 +00:00
-
32d8483443
fix: v_major derivation in cotiled diag
biondizzle
2026-05-24 01:53:40 +00:00
-
ce1e2177ec
diag: simplified cotiled layout test
biondizzle
2026-05-24 01:53:24 +00:00
-
f6e3bddb10
fix: LayoutEnum import in cotiled diag test
biondizzle
2026-05-24 01:52:58 +00:00
-
67a2c3ee72
diag: layout composition test for make_cotiled_copy SMEM-P
biondizzle
2026-05-24 01:48:42 +00:00
-
699c646497
D1.5: Fix bSG_gC slicing - group trailing modes (CUTLASS pattern)
biondizzle
2026-05-24 01:41:52 +00:00
-
f2ab5790e8
D1.5: Dynamic slicing for tTR_gC (variable rest dims)
biondizzle
2026-05-24 01:40:44 +00:00
-
d28257185f
D1.5: Fix flat_divide slice coordinates (4 modes, no STAGE dim)
biondizzle
2026-05-24 01:39:21 +00:00
-
86971dda81
D1.5: Rewrite correction epilogue using CUTLASS pattern (transform_partitioned, flat_divide, paired atoms)
biondizzle
2026-05-24 01:37:53 +00:00
-
ec250eccd6
D1.5: Fix TMA store - group_modes on bSG_gC, use flat indexing
biondizzle
2026-05-24 01:36:01 +00:00
-
61c4e107da
D1.5: Fix TMA store - use flat_divide on tCgC instead of local_tile on mC
biondizzle
2026-05-24 01:35:10 +00:00
-
6de0d316ef
D1.5: Fix TMA store - use 3D tile for local_tile on 3D mC
biondizzle
2026-05-24 01:20:33 +00:00
-
f59fd07ba7
D1.5: Use group_modes on sC for 2D TMA view (preserves swizzle)
biondizzle
2026-05-24 00:52:57 +00:00
-
577066bb7f
D1.5: Use 2D sC_epi layout from c_smem_s for TMA partition
biondizzle
2026-05-24 00:51:18 +00:00
-
534327f31b
D1.5: Fix TMA store - use group_modes on sC and tCgC
biondizzle
2026-05-24 00:48:18 +00:00
-
8048aa4be6
D1.5: Simplify TMA store - use 2D sC_epi and gC_epi views
biondizzle
2026-05-24 00:46:52 +00:00
-
88a5f55120
D1.5: Fix TMA store - use existing gC partition
biondizzle
2026-05-24 00:43:35 +00:00
-
b9e91853fb
D1.5: Implement correction epilog with paired atoms (get_tmem_load_op + get_smem_store_op)
biondizzle
2026-05-24 00:41:27 +00:00
-
e632490682
D1.5: Add TODO for correction epilog - keeping working TMEM round-trip for now
biondizzle
2026-05-24 00:37:36 +00:00
-
9f88db897f
D1.5: Revert to pre-epilog backup - correction epilog refactor is complex, will do incrementally
biondizzle
2026-05-24 00:35:00 +00:00
-
501ba7b2a5
D1.5: Fix TMA store - use local_tile with pv_mma_tiler
biondizzle
2026-05-24 00:32:35 +00:00
-
d028088dd0
D1.5: Fix TMA store rank mismatch - use 2D sC_epi view
biondizzle
2026-05-24 00:31:45 +00:00
-
ea5662ab2b
D1.5: Implement correction epilog with get_tmem_load_op + get_smem_store_op paired atoms
biondizzle
2026-05-24 00:30:38 +00:00
-
90131da010
D1.5: Replace TMEM round-trip normalize with correction epilog (one-way: TMEM→reg→SMEM→GMEM)
biondizzle
2026-05-24 00:24:24 +00:00
-
e23119ce7e
D1.3: Fix LSE tensor layout for weakly congruent store
biondizzle
2026-05-24 00:16:22 +00:00
-
d4aeb4e41c
D1.3: Add unnormalized debug test to isolate SMEM-P vs O round-trip error
biondizzle
2026-05-24 00:15:41 +00:00
-
b2a583a2a8
D1.3: Add SMEM-P write/read diagnostic
biondizzle
2026-05-24 00:13:28 +00:00
-
0fc6530f3f
D1.3: Add SMEM-P vs TMEM-P comparison test
biondizzle
2026-05-24 00:10:18 +00:00
-
d56e5601bb
D1.3: Fix while loop in cotiled diag - precompute num_tmem_alloc_cols
biondizzle
2026-05-24 00:07:22 +00:00
-
7bd857e5d3
D1.3: Fix cotiled diagnostic - use proper MMA construction
biondizzle
2026-05-24 00:06:50 +00:00
-
3fe17495ee
D1.3: Add make_cotiled_copy diagnostic test
biondizzle
2026-05-24 00:05:48 +00:00
-
ed539653d0
shit left dangling
biondizzle
2026-05-23 23:58:57 +00:00
-
0286d57631
D1.3: Re-enable coordinate-indexed SMEM-P write with identity tensor coords
biondizzle
2026-05-23 23:26:46 +00:00
-
3118bec420
D1.3: Revert to zero-fill for sP - need to verify sP→PV pipeline first
biondizzle
2026-05-23 23:26:07 +00:00
-
0963d949c4
D1.3: Compute (m,k) directly from thread mapping instead of identity tensor
biondizzle
2026-05-23 23:24:54 +00:00
-
fca9652719
D1.3: Add debug prints for SMEM-P coordinate mapping
biondizzle
2026-05-23 23:24:02 +00:00
-
de869c01c8
D1.3: Add SMEM-P coordinate diagnostic test
biondizzle
2026-05-23 23:23:05 +00:00
-
89393b8352
D1.3: Fix coord extraction - identity tensor stores (m,k) pairs as values
biondizzle
2026-05-23 23:21:15 +00:00
-
f74fd75054
D1.3: Fix coordinate indexing - tTMEM_LOADcS first mode is (32,1) nested tuple
biondizzle
2026-05-23 23:20:12 +00:00
-
4b8970d83c
D1.3: Direct coordinate-indexed SMEM-P write using tTMEM_LOADcS coords
biondizzle
2026-05-23 23:19:21 +00:00
-
58b4537741
D1.3: Use make_cotiled_copy for SMEM-P — custom TV layout from TMEM-load coords to sP
biondizzle
2026-05-23 23:17:30 +00:00
-
63f662edb3
Add SMEM-P guidance request document for CUTLASS LLM consultation
biondizzle
2026-05-23 23:03:35 +00:00
-
48c1e6d7e9
D1.3: Use const_expr for lse None check
biondizzle
2026-05-23 22:30:55 +00:00
-
82179f1f61
D1.3: Fix LSE with const_expr, always create valid mLSE tensor
biondizzle
2026-05-23 22:30:14 +00:00
-
f1341ad76e
D1.3: Try make_tiled_copy_C(qk_mma) for SMEM-P copy - zero-fill source for compile test
biondizzle
2026-05-23 22:29:10 +00:00
-
bafcfa658f
D1.3: Define SMEM-P copy atoms unconditionally (CuTeDSL scoping)
biondizzle
2026-05-23 22:28:12 +00:00
-
8d226a6243
D1.3: Use full sP (4D) for make_tiled_copy_D partition
biondizzle
2026-05-23 22:27:11 +00:00
-
fa2e513168
D1.3: SMEM-P via get_smem_store_op + make_tiled_copy_D
biondizzle
2026-05-23 22:26:09 +00:00
-
d10cab7a8e
D1.3: Enhanced diagnostic - test QK C-fragment as source for make_tiled_copy_C
biondizzle
2026-05-23 22:24:15 +00:00
-
a90fe41b6b
D1.3: Skip fragment creation in diagnostic, just print layouts
biondizzle
2026-05-23 22:21:31 +00:00
-
b871e6874b
D1.3: Fix diagnostic - use dummy ptr 0 for shape analysis
biondizzle
2026-05-23 22:20:16 +00:00
-
0b3d3bcd2b
D1.3: Fix sP allocation - p_smem_s.outer is already a layout
biondizzle
2026-05-23 22:19:11 +00:00
-
fc4106f37e
D1.3: Fix layout diagnostic - compute c_major outside kernel
biondizzle
2026-05-23 22:17:54 +00:00
-
6afa610b0d
D1.3: Layout diagnostic v2 - run inside JIT-compiled kernel
biondizzle
2026-05-23 22:16:57 +00:00
-
b185ac2080
D1.3: Fix layout diagnostic - remove JIT-dependent code
biondizzle
2026-05-23 22:15:47 +00:00
-
d265264f74
D1.3: Layout diagnostic - print all QK C-fragment and PV A-operand shapes
biondizzle
2026-05-23 22:14:35 +00:00
-
98e5b48470
Update all .md files with D5a/D5b progress, tOrP0 fix, LSE formula
biondizzle
2026-05-23 22:07:53 +00:00
-
53efb0c95e
Update STAGE_D.md with D5b results: merge cos 0.961, LSE err=0.0
biondizzle
2026-05-23 21:45:22 +00:00
-
b1152acd88
D5b: Fix reference computation - use logsumexp for stable LSE, fix o_unnorm definition
biondizzle
2026-05-23 21:43:04 +00:00
-
4ed2b46020
D5b MILESTONE: SWA+sink merge works! cos 0.969
biondizzle
2026-05-23 21:36:26 +00:00
-
b77ad244a2
D5b: Use normalized O + LSE for merge (correct formula), always output LSE
biondizzle
2026-05-23 21:35:40 +00:00
-
84200ca557
D5b: Clean up merge test - stable formula for both ref and kernel
biondizzle
2026-05-23 21:33:45 +00:00
-
909f880cc2
D5b: Use reference per-row LSE for proper O normalization
biondizzle
2026-05-23 21:31:52 +00:00
-
fef7e90c0a
D5b: Fix kernel_obj reference
biondizzle
2026-05-23 21:30:59 +00:00
-
d245342a7a
D5b: Fix syntax error
biondizzle
2026-05-23 21:30:00 +00:00
-
4a8fd64c4e
D5b: Debug reference formula mismatch, add numerically stable merge
biondizzle
2026-05-23 21:19:25 +00:00
-
e0201e581d
D5b: Python SWA+sink merge test
biondizzle
2026-05-23 21:18:06 +00:00
-
a629babb6a
Update STAGE_D.md: D5a done, CG-2/CG-3 status updated, tOrP0 offset rule added
biondizzle
2026-05-23 21:16:52 +00:00
-
aff208fb4c
D5a: Fix LSE formula - lse = ln(row_sum) + row_max * ln(2)
biondizzle
2026-05-23 21:15:14 +00:00
-
a5061a24b9
D5a: Use tensor indexing for LSE write
biondizzle
2026-05-23 21:13:52 +00:00
-
7a87c634fb
D5a: Use cute.store for LSE write
biondizzle
2026-05-23 21:13:07 +00:00
-
7c38bd5522
D5a: Fix LSE - compute row_max_safe from final row_max, remove mLSE None check
biondizzle
2026-05-23 21:12:29 +00:00
-
aecf6671d9
D5a: Fix - add normalize param to __init__
biondizzle
2026-05-23 21:11:37 +00:00
-
b273d4a7e8
D5a: Add normalize flag + LSE output
biondizzle
2026-05-23 21:10:40 +00:00
-
aa72779a7a
D1.3: Use const_expr if for tOrP0 compile-time selection
biondizzle
2026-05-23 21:07:58 +00:00
-
61cb8f002d
D1.3: Pre-compute tOrP0_offset in _setup, use const_expr for compile-time selection
biondizzle
2026-05-23 21:07:10 +00:00
-
77035f8a54
D1.3: Use const_expr for tOrP0 offset (compile-time conditional)
biondizzle
2026-05-23 21:06:16 +00:00
-
2e0db67c80
D1.3: Use MLIR-compatible expression for tOrP0 offset (same as Stage C)
biondizzle
2026-05-23 21:05:12 +00:00
-
399a241e84
D1.3: Initialize tOrP0 before conditional for CuTeDSL scoping
biondizzle
2026-05-23 21:03:53 +00:00