paper(1H): 6-case GQA long-ctx + IPCQ design alternatives + GEMM terminology

- §6 GQA: rewrite long-context decode from 4-case to 6-case. Data
  Placement Policy now presents the six placement options and their
  intrinsic per-PE memory / per-token comm costs (no winner predicted);
  the long-context subsection selects the best placement for that regime
  (Case 6 ★, both-axes S_kv shard) from the measured 6-case sweep. Add
  KV-sharding diagram + analytical budget/summary figures.
- Regenerate the 6-row decode sweep (milestone-1h-gqa) and the
  sweep-dependent decode panels (latency/traffic/parallelism/memory) so
  figures, prose, and sweep_decode.json are mutually consistent.
- §5 All-Reduce: add IPCQ design alternatives (architecture + decision
  matrix) as design-rationale schematics (illustrative step-counts, not
  measured) and the bench-generated topology diagram.
- §4 GEMM: rename "user-orchestrated/user-level" -> "kernel-orchestrated/
  kernel-level" (orchestration runs in the kernel program vs the
  scheduler-orchestrated composite); minor accuracy fixes (7.18 TFLOP/s
  ~10% below peak; ~781 ns DMA).
- Recompile build/main.pdf.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-22 00:55:54 -07:00
parent bb668a3ac3
commit e9a5c438e3
20 changed files with 351 additions and 154 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 34 KiB

@@ -33,7 +33,7 @@
"bytes_hbm": 6144,
"arith_intensity": 10.666666666666666,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.112,
"sim_wall_clock_s": 0.226,
"engines": {
"pe_dma": {
"occupancy_ns": 79.0,
@@ -100,7 +100,7 @@
"bytes_hbm": 6144,
"arith_intensity": 10.666666666666666,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.108,
"sim_wall_clock_s": 0.186,
"engines": {
"pe_dma": {
"occupancy_ns": 71.0,
@@ -167,11 +167,11 @@
"bytes_hbm": 6144,
"arith_intensity": 10.666666666666666,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.105,
"sim_wall_clock_s": 0.181,
"engines": {
"pe_dma": {
"occupancy_ns": 63.0,
"wall_ns": 63.0,
"wall_ns": 51.0,
"record_count": 3
},
"pe_fetch_store": {
@@ -222,7 +222,7 @@
"record_count": 0
}
},
"pe_window_ns": 183.394,
"pe_window_ns": 151.394,
"composite_window_ns": 77.38400000000001
},
{
@@ -234,7 +234,7 @@
"bytes_hbm": 10240,
"arith_intensity": 12.8,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.169,
"sim_wall_clock_s": 0.314,
"engines": {
"pe_dma": {
"occupancy_ns": 79.0,
@@ -301,7 +301,7 @@
"bytes_hbm": 10240,
"arith_intensity": 12.8,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.163,
"sim_wall_clock_s": 0.191,
"engines": {
"pe_dma": {
"occupancy_ns": 79.0,
@@ -368,11 +368,11 @@
"bytes_hbm": 10240,
"arith_intensity": 12.8,
"tile_count_expected": 1,
"sim_wall_clock_s": 0.104,
"sim_wall_clock_s": 0.186,
"engines": {
"pe_dma": {
"occupancy_ns": 79.0,
"wall_ns": 79.0,
"occupancy_ns": 86.0,
"wall_ns": 66.0,
"record_count": 3
},
"pe_fetch_store": {
@@ -423,7 +423,7 @@
"record_count": 0
}
},
"pe_window_ns": 191.394,
"pe_window_ns": 166.394,
"composite_window_ns": 77.38400000000001
},
{
@@ -435,7 +435,7 @@
"bytes_hbm": 18432,
"arith_intensity": 14.222222222222221,
"tile_count_expected": 2,
"sim_wall_clock_s": 0.162,
"sim_wall_clock_s": 0.318,
"engines": {
"pe_dma": {
"occupancy_ns": 158.995,
@@ -502,7 +502,7 @@
"bytes_hbm": 18432,
"arith_intensity": 14.222222222222221,
"tile_count_expected": 2,
"sim_wall_clock_s": 0.183,
"sim_wall_clock_s": 0.188,
"engines": {
"pe_dma": {
"occupancy_ns": 139.995,
@@ -569,11 +569,11 @@
"bytes_hbm": 18432,
"arith_intensity": 14.222222222222221,
"tile_count_expected": 2,
"sim_wall_clock_s": 0.106,
"sim_wall_clock_s": 0.186,
"engines": {
"pe_dma": {
"occupancy_ns": 112.0,
"wall_ns": 107.0,
"occupancy_ns": 134.0,
"wall_ns": 98.0,
"record_count": 3
},
"pe_fetch_store": {
@@ -624,7 +624,7 @@
"record_count": 0
}
},
"pe_window_ns": 223.77800000000002,
"pe_window_ns": 214.77800000000002,
"composite_window_ns": 93.76800000000003
},
{
@@ -636,7 +636,7 @@
"bytes_hbm": 49152,
"arith_intensity": 21.333333333333332,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.177,
"sim_wall_clock_s": 0.308,
"engines": {
"pe_dma": {
"occupancy_ns": 1798.8600000000001,
@@ -703,7 +703,7 @@
"bytes_hbm": 49152,
"arith_intensity": 21.333333333333332,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.22,
"sim_wall_clock_s": 0.263,
"engines": {
"pe_dma": {
"occupancy_ns": 819.8600000000001,
@@ -770,11 +770,11 @@
"bytes_hbm": 49152,
"arith_intensity": 21.333333333333332,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.112,
"sim_wall_clock_s": 0.183,
"engines": {
"pe_dma": {
"occupancy_ns": 283.0,
"wall_ns": 238.07200000000012,
"occupancy_ns": 305.0,
"wall_ns": 229.07200000000012,
"record_count": 6
},
"pe_fetch_store": {
@@ -825,7 +825,7 @@
"record_count": 0
}
},
"pe_window_ns": 418.0820000000001,
"pe_window_ns": 409.0820000000001,
"composite_window_ns": 192.07200000000012
},
{
@@ -837,7 +837,7 @@
"bytes_hbm": 395264,
"arith_intensity": 15.917098445595855,
"tile_count_expected": 48,
"sim_wall_clock_s": 0.2,
"sim_wall_clock_s": 0.293,
"engines": {
"pe_dma": {
"occupancy_ns": 56319.35999999987,
@@ -904,7 +904,7 @@
"bytes_hbm": 395264,
"arith_intensity": 15.917098445595855,
"tile_count_expected": 48,
"sim_wall_clock_s": 0.237,
"sim_wall_clock_s": 0.292,
"engines": {
"pe_dma": {
"occupancy_ns": 20236.359999999866,
@@ -912,13 +912,13 @@
"record_count": 50
},
"pe_fetch_store": {
"occupancy_ns": 1543.9999999999998,
"occupancy_ns": 1543.9999999999995,
"wall_ns": 791.9999999999998,
"record_count": 49
},
"pe_gemm": {
"occupancy_ns": 1219.584000000017,
"wall_ns": 786.4320000000007,
"occupancy_ns": 1219.5840000000169,
"wall_ns": 786.4320000000005,
"record_count": 48
},
"pe_math": {
@@ -939,7 +939,7 @@
"record_count": 1
},
"FETCH": {
"occupancy_ns": 1535.9999999999998,
"occupancy_ns": 1535.9999999999995,
"wall_ns": 783.9999999999998,
"record_count": 48
},
@@ -949,8 +949,8 @@
"record_count": 1
},
"GEMM": {
"occupancy_ns": 1219.584000000017,
"wall_ns": 786.4320000000007,
"occupancy_ns": 1219.5840000000169,
"wall_ns": 786.4320000000005,
"record_count": 48
},
"MATH": {
@@ -971,10 +971,10 @@
"bytes_hbm": 395264,
"arith_intensity": 15.917098445595855,
"tile_count_expected": 48,
"sim_wall_clock_s": 0.208,
"sim_wall_clock_s": 0.237,
"engines": {
"pe_dma": {
"occupancy_ns": 2310.0,
"occupancy_ns": 2342.0,
"wall_ns": 1569.9999999999998,
"record_count": 3
},
@@ -1038,7 +1038,7 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.089,
"sim_wall_clock_s": 0.259,
"engines": {
"pe_dma": {
"occupancy_ns": 1798.8600000000001,
@@ -1105,7 +1105,7 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.155,
"sim_wall_clock_s": 0.313,
"engines": {
"pe_dma": {
"occupancy_ns": 795.8600000000001,
@@ -1172,11 +1172,11 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 8,
"sim_wall_clock_s": 0.234,
"sim_wall_clock_s": 0.32,
"engines": {
"pe_dma": {
"occupancy_ns": 258.0,
"wall_ns": 218.07200000000012,
"wall_ns": 206.07200000000012,
"record_count": 6
},
"pe_fetch_store": {
@@ -1227,7 +1227,7 @@
"record_count": 0
}
},
"pe_window_ns": 418.0820000000001,
"pe_window_ns": 386.0820000000001,
"composite_window_ns": 192.07200000000012
},
{
@@ -1239,7 +1239,7 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 16,
"sim_wall_clock_s": 0.119,
"sim_wall_clock_s": 0.304,
"engines": {
"pe_dma": {
"occupancy_ns": 7854.6320000000005,
@@ -1306,7 +1306,7 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 16,
"sim_wall_clock_s": 0.183,
"sim_wall_clock_s": 0.165,
"engines": {
"pe_dma": {
"occupancy_ns": 3779.6320000000005,
@@ -1373,11 +1373,11 @@
"bytes_hbm": 36864,
"arith_intensity": 7.111111111111111,
"tile_count_expected": 16,
"sim_wall_clock_s": 0.179,
"sim_wall_clock_s": 0.236,
"engines": {
"pe_dma": {
"occupancy_ns": 858.0,
"wall_ns": 183.0,
"wall_ns": 171.0,
"record_count": 18
},
"pe_fetch_store": {
@@ -1428,7 +1428,7 @@
"record_count": 0
}
},
"pe_window_ns": 511.01,
"pe_window_ns": 479.01,
"composite_window_ns": 405.0
},
{
@@ -1440,7 +1440,7 @@
"bytes_hbm": 1572864,
"arith_intensity": 170.66666666666666,
"tile_count_expected": 2048,
"sim_wall_clock_s": 1.241,
"sim_wall_clock_s": 2.164,
"engines": {
"pe_dma": {
"occupancy_ns": 104867178.97599977,
@@ -1507,7 +1507,7 @@
"bytes_hbm": 1572864,
"arith_intensity": 170.66666666666666,
"tile_count_expected": 2048,
"sim_wall_clock_s": 0.742,
"sim_wall_clock_s": 1.398,
"engines": {
"pe_dma": {
"occupancy_ns": 37760375.97599977,
@@ -1520,7 +1520,7 @@
"record_count": 2304
},
"pe_gemm": {
"occupancy_ns": 36417.40799998891,
"occupancy_ns": 36417.407999988936,
"wall_ns": 33554.43199999761,
"record_count": 2048
},
@@ -1547,12 +1547,12 @@
"record_count": 2048
},
"STORE": {
"occupancy_ns": 130151.58400000146,
"occupancy_ns": 130151.58400000144,
"wall_ns": 31914.784000000003,
"record_count": 256
},
"GEMM": {
"occupancy_ns": 36417.40799998891,
"occupancy_ns": 36417.407999988936,
"wall_ns": 33554.43199999761,
"record_count": 2048
},
@@ -1574,10 +1574,10 @@
"bytes_hbm": 1572864,
"arith_intensity": 170.66666666666666,
"tile_count_expected": 2048,
"sim_wall_clock_s": 0.406,
"sim_wall_clock_s": 0.477,
"engines": {
"pe_dma": {
"occupancy_ns": 142065.0,
"occupancy_ns": 142097.0,
"wall_ns": 6170.0,
"record_count": 258
},
@@ -1587,8 +1587,8 @@
"record_count": 2304
},
"pe_gemm": {
"occupancy_ns": 838467.5839981049,
"wall_ns": 33554.43199999738,
"occupancy_ns": 838467.5839981119,
"wall_ns": 33554.431999997396,
"record_count": 2048
},
"pe_math": {
@@ -1619,8 +1619,8 @@
"record_count": 256
},
"GEMM": {
"occupancy_ns": 838467.5839981049,
"wall_ns": 33554.43199999738,
"occupancy_ns": 838467.5839981119,
"wall_ns": 33554.431999997396,
"record_count": 2048
},
"MATH": {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

@@ -4,7 +4,9 @@
"single_kv_group_decode_long_ctx_gqa_cube_sp_pe_sp",
"single_kv_group_decode_long_ctx_gqa_cube_repl_pe_tp",
"single_kv_group_decode_long_ctx_gqa_cube_repl_pe_sp",
"single_kv_group_decode_long_ctx_gqa_cube_sp_pe_tp"
"single_kv_group_decode_long_ctx_gqa_cube_sp_pe_tp",
"single_kv_group_decode_long_ctx_gqa_cube_sp_pe_tp_dhead",
"single_kv_group_decode_long_ctx_gqa_cube_tp_dhead_pe_sp"
],
"rows": [
{
@@ -23,11 +25,11 @@
"dma_read_count": 192,
"dma_write_count": 1
},
"latency_ns": 34030.00300000079,
"latency_ns": 30646.00300000079,
"engine_occupancy_ns": {
"pe_gemm": 4194.303999999538,
"pe_math": 2282.0,
"pe_dma": 1138201.8199999991,
"pe_dma": 1814643.714999999,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -49,11 +51,11 @@
"dma_read_count": 17,
"dma_write_count": 1
},
"latency_ns": 25428.38200085424,
"latency_ns": 21332.36200087145,
"engine_occupancy_ns": {
"pe_gemm": 4194.303999997675,
"pe_math": 714.0,
"pe_dma": 18217.080000881106,
"pe_dma": 26829.080001339316,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -75,11 +77,11 @@
"dma_read_count": 192,
"dma_write_count": 1
},
"latency_ns": 20152.09400000231,
"latency_ns": 17826.79400000139,
"engine_occupancy_ns": {
"pe_gemm": 33554.431999996305,
"pe_math": 5684.0,
"pe_dma": 853218.7100000716,
"pe_dma": 1347469.350000088,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -101,11 +103,63 @@
"dma_read_count": 24,
"dma_write_count": 1
},
"latency_ns": 26987.291500001098,
"latency_ns": 25750.79150000075,
"engine_occupancy_ns": {
"pe_gemm": 4194.303999999538,
"pe_math": 714.0,
"pe_dma": 126624.99000000354,
"pe_dma": 200429.48000000394,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
}
},
{
"panel": "single_kv_group_decode_long_ctx_gqa_cube_sp_pe_tp_dhead",
"kind": "decode_long_ctx_cube_sp_pe_tp_dhead",
"C": 8,
"P": 8,
"T_q": 1,
"S_kv": 8192,
"d_head": 128,
"h_q": 8,
"h_kv": 1,
"op_log_summary": {
"gemm_count": 128,
"ipcq_copy_count": 280,
"dma_read_count": 192,
"dma_write_count": 8
},
"latency_ns": 31385.502000000277,
"engine_occupancy_ns": {
"pe_gemm": 4194.303999999545,
"pe_math": 10392.0,
"pe_dma": 1815478.0114999914,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
}
},
{
"panel": "single_kv_group_decode_long_ctx_gqa_cube_tp_dhead_pe_sp",
"kind": "decode_long_ctx_cube_tp_dhead_pe_sp",
"C": 8,
"P": 8,
"T_q": 1,
"S_kv": 8192,
"d_head": 128,
"h_q": 8,
"h_kv": 1,
"op_log_summary": {
"gemm_count": 128,
"ipcq_copy_count": 280,
"dma_read_count": 192,
"dma_write_count": 8
},
"latency_ns": 34480.97100000052,
"engine_occupancy_ns": {
"pe_gemm": 4194.303999999538,
"pe_math": 10392.0,
"pe_dma": 2093451.153999999,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -23,11 +23,11 @@
"dma_read_count": 192,
"dma_write_count": 8
},
"latency_ns": 86702.76799999712,
"latency_ns": 75610.43899999752,
"engine_occupancy_ns": {
"pe_gemm": 134217.72799998685,
"pe_gemm": 134217.72799999084,
"pe_math": 546656.0,
"pe_dma": 2388650.3709999938,
"pe_dma": 4511934.237999992,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -49,11 +49,11 @@
"dma_read_count": 1088,
"dma_write_count": 64
},
"latency_ns": 93564.33200003332,
"latency_ns": 67203.7500000147,
"engine_occupancy_ns": {
"pe_gemm": 134217.72799998525,
"pe_math": 81279.99999999997,
"pe_dma": 177951.73600022023,
"pe_math": 81280.0,
"pe_dma": 446811.4240000146,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -75,11 +75,11 @@
"dma_read_count": 12288,
"dma_write_count": 64
},
"latency_ns": 190579.57100032456,
"latency_ns": 97218.17750020314,
"engine_occupancy_ns": {
"pe_gemm": 1073741.8240003586,
"pe_math": 635904.0,
"pe_dma": 1756854.05751659,
"pe_dma": 3291993.537524393,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0
@@ -101,11 +101,11 @@
"dma_read_count": 192,
"dma_write_count": 64
},
"latency_ns": 38876.32300000038,
"latency_ns": 39045.51900000019,
"engine_occupancy_ns": {
"pe_gemm": 134217.7280000001,
"pe_math": 81280.0,
"pe_dma": 916284.0330000015,
"pe_dma": 1860586.0079999897,
"pe_fetch_store": 0,
"pe_ipcq": 0,
"pe_cpu": 0