prefill: AGMM LoFi-peak efficiency + named Tracy instrumentation (~61% B8/32k wall) #151

Closed
opened 2026-10-02 20:32:04 +02:00 by tenstorrent · 9 comments
Member

Grill\n- Call: GO\n- Hypothesis: Prefill dominates B8/32k wall time; AGMM reaches only about 55–59% of LoFi peak, and missing named Tracy spans prevent actionable attribution.\n- Depends: #90; current B8/32k prefill run.\n- Measure first: per-op AGMM efficiency versus LoFi peak, wall-time share, and named Tracy instrumentation with reproducible run metadata.\n- Out of scope: decode tuning and peak claims without per-op names.\n- Refs: #90, B8/32k (~61% wall).

## Grill\n- **Call:** GO\n- **Hypothesis:** Prefill dominates B8/32k wall time; AGMM reaches only about 55–59% of LoFi peak, and missing named Tracy spans prevent actionable attribution.\n- **Depends:** #90; current B8/32k prefill run.\n- **Measure first:** per-op AGMM efficiency versus LoFi peak, wall-time share, and named Tracy instrumentation with reproducible run metadata.\n- **Out of scope:** decode tuning and peak claims without per-op names.\n- **Refs:** #90, B8/32k (~61% wall).
Owner

Prepared on branch prefill-prof (96af1c6). Op names come without a Tracy build.

  • Naming: QWEN36_OPMARK=1 (banner QWEN36_OPMARK engaged) records each ttnn call's device program-id range. opmark_join.py then joins the realtime-profiler records to those ranges, so every program gets its op name. Unset, nothing changes, device programs included.
  • Parser: prefill-op-share.py --named gives, per op and role: count, µs, cores, FLOPs, TF/s, % of LoFi peak and % of prefill wall, rescaled to the measured AICLK.
    • LoFi peak = cores × 4096 × AICLK ÷ fidelity phases.
    • bfp8 rows are also shown against the HiFi2 peak.
  • Run: bench/probes/prefill_opmark/run.sh, B8/32k. It takes traced and eager profiles, and a must-fail with SDPA at HiFi2.
  • Pass criteria:
    • at least 95% of device time named;
    • identical logits across traced, eager and recording off;
    • the must-fail moves SDPA by at least +20% while AGMM stays within ±3%.
  • Queued in block c164-prof of card queue c160 (~45–60 min of mesh time). No numbers yet.
Prepared on branch `prefill-prof` (96af1c6). Op names come without a Tracy build. - **Naming:** `QWEN36_OPMARK=1` (banner `QWEN36_OPMARK engaged`) records each ttnn call's device program-id range. `opmark_join.py` then joins the realtime-profiler records to those ranges, so every program gets its op name. Unset, nothing changes, device programs included. - **Parser:** `prefill-op-share.py --named` gives, per op and role: count, µs, cores, FLOPs, TF/s, % of LoFi peak and % of prefill wall, rescaled to the measured AICLK. - LoFi peak = cores × 4096 × AICLK ÷ fidelity phases. - bfp8 rows are also shown against the HiFi2 peak. - **Run:** `bench/probes/prefill_opmark/run.sh`, B8/32k. It takes traced and eager profiles, and a must-fail with SDPA at HiFi2. - **Pass criteria:** - at least 95% of device time named; - identical logits across traced, eager and recording off; - the must-fail moves SDPA by at least +20% while AGMM stays within ±3%. - **Queued** in block c164-prof of card queue c160 (~45–60 min of mesh time). No numbers yet.
Owner

c164 step 167 failed at preflight, but OPMARK itself engaged (QWEN36_OPMARK engaged is in the workbench log).

  • Cause: ttx's workbench banner check refused the arm. It required five vLLM-engine-only banners (MTP/ASYNC scheduler and runner, num_lookahead_tokens) that a workbench process can never print. This is the first workbench arm built on an MTP arm.
  • Fix: prefill-prof 4d35a9f.
    • The skip list now covers the plugin-only banners.
    • The banner grep runs on every exit path.
    • The verdict names what was refused.
    • Tests are added.
  • Status: the rerun is queued in c165. No numbers yet.
c164 step 167 failed at preflight, but OPMARK itself engaged (`QWEN36_OPMARK engaged` is in the workbench log). - **Cause:** ttx's workbench banner check refused the arm. It required five vLLM-engine-only banners (MTP/ASYNC scheduler and runner, `num_lookahead_tokens`) that a workbench process can never print. This is the first workbench arm built on an MTP arm. - **Fix:** `prefill-prof` 4d35a9f. - The skip list now covers the plugin-only banners. - The banner grep runs on every exit path. - The verdict names what was refused. - Tests are added. - **Status:** the rerun is queued in c165. No numbers yet.
Owner

Opmark rerun (c165 step 11) INCOMPLETE: the workbench re-capture failed in mtp_batch_host.plan() ('row 0: position 0 is past its page table (0 positions)') when setting new knobs in warmup_model_decode. A per-op table printed before the failure (bench/runs/queue-c165.log, step 11) but it is not a served number. Fix in progress.

Opmark rerun (c165 step 11) INCOMPLETE: the workbench re-capture failed in mtp_batch_host.plan() ('row 0: position 0 is past its page table (0 positions)') when setting new knobs in warmup_model_decode. A per-op table printed before the failure (bench/runs/queue-c165.log, step 11) but it is not a served number. Fix in progress.
Owner

c169 opmark — 32k prefill per-op table (2-card TP=2, B8 workbench, arm kda2-lmlofi)

Record: bench/runs/prefill-opmark-20261003T081632Z.{jsonl,named.txt} + bench/runs/ttx-wb-wb-…-kda2-lmlofi-opmark-20261003T082529Z.jsonl (branch prefill-prof, d9dc0bf5). Workbench: no served speed number. Chip 0 only; AICLK 1350 MHz.
Walls: traced 32k prefill 5367 ms (335 ms/chunk); stock chunk 351/372/362 ms at ctx 0/16k/30k → ~94 tok/s PP (wb, not served). TG not measured.

Verdict: INCOMPLETE — the opmark names are not trustworthy, so the "~50% concat/slice/copy" reading is not supported.

  • Eager named rows put AGMM at 190–430% of LoFi peak (physically impossible) → names misaligned to programs; the 16% concat / 12.5% slice rows that suggested ~50% DM come from this table.
  • Traced named rows carry 512-bucket shapes and decode kernels (sdpa_flash_decode, update_cache) → runtime-id map crosses traces.
  • Must-fail rung (SDPA HiFi2) never ran: ttx refused wb set on an expected eager-only banner (QWEN36_MTP_WARM_TAIL skipped). Eager vs traced logits sha differ (7f67… vs 2f26…).

Usable view: eager per-kernel device time (kernel sources from the profiler, not opmark names; counts check out: AGMM 1024 = 64 layers × 16 chunks, GDN scan 768 = 48 × 16). Eager chip0 device busy 6434 ms (> traced wall, so eager runs ~1.1 s of extra programs; shares are of eager busy):

# kernel (chip0, eager) progs ms Mcycles % busy DM
1 AGMM all_gather_minimal_matmul_async:compute 3187 2135.8 2883 33.2
2 GDN chunk_gdn_scan 797 544.8 735 8.5
3 matmul bmm_large_block_zm_fused_bias_activation 1861 531.2 717 8.3
4 tilize_wh 3189 463.6 626 7.2 DM
5 SDPA sdpa (prefill) 265 392.0 529 6.1
6 untilize_wh 3986 340.1 459 5.3 DM
7 ternary_addc_ops_fpu_rowbcast (addcmul) 2391 282.4 381 4.4
8 reduce_scatter line_reduction 1062 257.2 347 4.0
9 slice (stick writer) 2391 250.8 339 3.9 DM
10 slice (tile writer) 8233 233.6 315 3.6 DM
11 rmsnorm_post_allgather 2126 175.3 237 2.7
12 eltwise_sfpu 2656 136.3 184 2.1
13 binary_ng no_bcast 2389 130.0 176 2.0
16 reshape_view 1594 84.2 114 1.3 DM
20 typecast 3984 33.2 45 0.5 DM
22 concat 797 29.4 40 0.5 DM

Data movement total: 1465 ms = 22.8% of eager chip0 busy (tilize+untilize 12.5%, slice 7.5%, reshape 1.3%, typecast/concat/copy/nlp_create_qkv ~1.3%). Top DM cost: tilize_wh (463.6 ms, 626 Mcycles, 7.2%) — 2304 programs at ~165 µs, i.e. ~144 per 2048-chunk; together with untilize_wh it is a row-major↔tile round trip around the GDN/conv path. Caveat: whether these tilize/untilize programs also exist in the traced served path is not shown (traced attribution is broken).

AGMM efficiency (eager clusters, est. from kernel time): swiglu 1024 × 1207 µs → 302 TF/s = 62% LoFi (88 cores); out colpar 1024 × 280 µs → ~47%.

Next: (1) ttx: accept QWEN36_MTP_WARM_TAIL skipped on --eager wb ops; (2) fix opmark runtime-id ↔ name alignment (traced: key by trace id; eager: off-by-N), gated by the HiFi2 must-fail; then re-queue the probe. Data movement is a real ~23% lever (tilize/untilize fusion first), not 50%.

## c169 opmark — 32k prefill per-op table (2-card TP=2, B8 workbench, arm kda2-lmlofi) **Record:** `bench/runs/prefill-opmark-20261003T081632Z.{jsonl,named.txt}` + `bench/runs/ttx-wb-wb-…-kda2-lmlofi-opmark-20261003T082529Z.jsonl` (branch `prefill-prof`, d9dc0bf5). Workbench: **no served speed number**. Chip 0 only; AICLK 1350 MHz. Walls: traced 32k prefill 5367 ms (335 ms/chunk); stock chunk 351/372/362 ms at ctx 0/16k/30k → **~94 tok/s PP (wb, not served)**. TG not measured. **Verdict: INCOMPLETE — the opmark *names* are not trustworthy, so the "~50% concat/slice/copy" reading is not supported.** - Eager named rows put AGMM at 190–430% of LoFi peak (physically impossible) → names misaligned to programs; the 16% `concat` / 12.5% `slice` rows that suggested ~50% DM come from this table. - Traced named rows carry 512-bucket shapes and decode kernels (sdpa_flash_decode, update_cache) → runtime-id map crosses traces. - Must-fail rung (SDPA HiFi2) never ran: ttx refused `wb set` on an expected eager-only banner (`QWEN36_MTP_WARM_TAIL skipped`). Eager vs traced logits sha differ (7f67… vs 2f26…). **Usable view: eager per-kernel device time (kernel sources from the profiler, not opmark names; counts check out: AGMM 1024 = 64 layers × 16 chunks, GDN scan 768 = 48 × 16).** Eager chip0 device busy 6434 ms (> traced wall, so eager runs ~1.1 s of extra programs; shares are of eager busy): | # | kernel (chip0, eager) | progs | ms | Mcycles | % busy | DM | |---|---|---:|---:|---:|---:|:-:| | 1 | AGMM `all_gather_minimal_matmul_async:compute` | 3187 | 2135.8 | 2883 | 33.2 | | | 2 | GDN `chunk_gdn_scan` | 797 | 544.8 | 735 | 8.5 | | | 3 | matmul `bmm_large_block_zm_fused_bias_activation` | 1861 | 531.2 | 717 | 8.3 | | | 4 | **`tilize_wh`** | 3189 | 463.6 | 626 | 7.2 | DM | | 5 | SDPA `sdpa` (prefill) | 265 | 392.0 | 529 | 6.1 | | | 6 | **`untilize_wh`** | 3986 | 340.1 | 459 | 5.3 | DM | | 7 | `ternary_addc_ops_fpu_rowbcast` (addcmul) | 2391 | 282.4 | 381 | 4.4 | | | 8 | reduce_scatter `line_reduction` | 1062 | 257.2 | 347 | 4.0 | | | 9 | **slice (stick writer)** | 2391 | 250.8 | 339 | 3.9 | DM | | 10 | **slice (tile writer)** | 8233 | 233.6 | 315 | 3.6 | DM | | 11 | rmsnorm_post_allgather | 2126 | 175.3 | 237 | 2.7 | | | 12 | eltwise_sfpu | 2656 | 136.3 | 184 | 2.1 | | | 13 | binary_ng no_bcast | 2389 | 130.0 | 176 | 2.0 | | | 16 | reshape_view | 1594 | 84.2 | 114 | 1.3 | DM | | 20 | typecast | 3984 | 33.2 | 45 | 0.5 | DM | | 22 | concat | 797 | 29.4 | 40 | 0.5 | DM | **Data movement total: 1465 ms = 22.8% of eager chip0 busy** (tilize+untilize 12.5%, slice 7.5%, reshape 1.3%, typecast/concat/copy/nlp_create_qkv ~1.3%). **Top DM cost: tilize_wh (463.6 ms, 626 Mcycles, 7.2%)** — 2304 programs at ~165 µs, i.e. ~144 per 2048-chunk; together with untilize_wh it is a row-major↔tile round trip around the GDN/conv path. Caveat: whether these tilize/untilize programs also exist in the *traced* served path is not shown (traced attribution is broken). AGMM efficiency (eager clusters, est. from kernel time): swiglu 1024 × 1207 µs → 302 TF/s = **62% LoFi** (88 cores); out colpar 1024 × 280 µs → ~47%. **Next:** (1) ttx: accept `QWEN36_MTP_WARM_TAIL skipped` on `--eager` wb ops; (2) fix opmark runtime-id ↔ name alignment (traced: key by trace id; eager: off-by-N), gated by the HiFi2 must-fail; then re-queue the probe. Data movement is a real ~23% lever (tilize/untilize fusion first), not 50%.
Author
Member

Desk work comes before any card. ttx must accept the banner QWEN36_MTP_WARM_TAIL skipped on --eager wb ops, and opmark runtime-id names must be realigned (traced: key by trace id; eager: off-by-N). Gate that on the SDPA HiFi2 must-fail. Pass: the must-fail fires, and eager AGMM is not hundreds of percent of LoFi peak. Then re-queue the 32k prefill probe. Do not quote the broken concat/slice table, and do not quote the workbench ~94 tok/s PP as a served number. No kernel. Interim eager-only note: data movement is ~23% of eager busy, and tilize/untilize comes first.

Desk work comes before any card. ttx must accept the banner `QWEN36_MTP_WARM_TAIL skipped` on `--eager` wb ops, and opmark runtime-id names must be realigned (traced: key by trace id; eager: off-by-N). Gate that on the SDPA HiFi2 must-fail. Pass: the must-fail fires, and eager AGMM is not hundreds of percent of LoFi peak. Then re-queue the 32k prefill probe. Do not quote the broken concat/slice table, and do not quote the workbench ~94 tok/s PP as a served number. No kernel. Interim eager-only note: data movement is ~23% of eager busy, and tilize/untilize comes first.
Author
Member

External check, 2026-10-03: no sourced ~6k dense dual-R9700 prefill

Web search (HF, Reddit, AMD, vLLM, llama.cpp, tinygrad) did not find a post that measures ~6000 prefill tok/s on dense Qwen3.8-27B or Qwen3.6-27B with 2× Radeon AI PRO R9700.

Nearest same-model number: andysalerno/r9700-serving benchmarks/09_24_fullbuild_aiter_vllm30.md (commit 1d3ce0ef, 2026-09-24). 2× R9700 (gfx1201), TP=2, Qwen/Qwen3.8-27B-FP8, FP8 KV, AITER unified attention, MTP=3, one request, llama-benchy:

  • pp2048 @ d4096: 3121.74 ± 118.01 tok/s
  • pp2048 @ d32000: 2908.79 ± 2.66 tok/s

The 5966.93 on the d16384 row is e2e_ttft in milliseconds, not tok/s.

Our BEST …-gdc-cpk (README results table; LEDGER R-2026-10-03-gdc-cpk): PP = B × ctx / TTFT. B1/4k 5,320, B1/32k 5,938, B8/4k 5,201, B8/32k 5,965 (G2 bfp4, KV K bf8 / V bf4). Same unit (prefill tok/s): ahead of that 2.9–3.1k chunk rate. Not the same shape: ours is full-prompt aggregate; theirs is a 2048-token chunk at a stated depth.

Also behind, different quant/split: llama.cpp dual R9700, Qwen3.6-27B Q5_K_M, -sm layer — pp4096 1534.47, pp32768 1215.87 (truelies444 README).

Not the same metric: single-R9700 MoE ~6,040 prefill tok/s at 50k (r/LocalLLaMA, Qwen3.6-35B-A3B); Alex Miller's dual-R9700 MXFP4 3,948 prompt tok/s has no stated context.

Does not change this issue's gate. Opmark names are still untrustworthy; do not quote the broken ~50% concat/slice table or the workbench ~94 tok/s PP.

## External check, 2026-10-03: no sourced ~6k dense dual-R9700 prefill Web search (HF, Reddit, AMD, vLLM, llama.cpp, tinygrad) did not find a post that measures ~6000 prefill tok/s on dense Qwen3.8-27B or Qwen3.6-27B with 2× Radeon AI PRO R9700. Nearest same-model number: [andysalerno/r9700-serving benchmarks/09_24_fullbuild_aiter_vllm30.md](https://github.com/andysalerno/r9700-serving/blob/1d3ce0ef22ffc4a778fd832779d6dbd3d98d1fdb/benchmarks/09_24_fullbuild_aiter_vllm30.md) (commit `1d3ce0ef`, 2026-09-24). 2× R9700 (`gfx1201`), TP=2, `Qwen/Qwen3.8-27B-FP8`, FP8 KV, AITER unified attention, MTP=3, one request, llama-benchy: - `pp2048 @ d4096`: **3121.74 ± 118.01 tok/s** - `pp2048 @ d32000`: **2908.79 ± 2.66 tok/s** The **5966.93** on the `d16384` row is `e2e_ttft` in **milliseconds**, not tok/s. Our BEST `…-gdc-cpk` (README results table; LEDGER `R-2026-10-03-gdc-cpk`): PP = B × ctx / TTFT. B1/4k **5,320**, B1/32k **5,938**, B8/4k **5,201**, B8/32k **5,965** (G2 bfp4, KV K bf8 / V bf4). Same unit (prefill tok/s): ahead of that 2.9–3.1k chunk rate. Not the same shape: ours is full-prompt aggregate; theirs is a 2048-token chunk at a stated depth. Also behind, different quant/split: llama.cpp dual R9700, Qwen3.6-27B Q5_K_M, `-sm layer` — pp4096 **1534.47**, pp32768 **1215.87** ([truelies444 README](https://github.com/truelies444/amd-radeon-ai-pro-r9700-llama-cpp-rocm-benchmarks)). Not the same metric: single-R9700 MoE ~6,040 prefill tok/s at 50k (r/LocalLLaMA, Qwen3.6-35B-A3B); Alex Miller's dual-R9700 MXFP4 **3,948** prompt tok/s has no stated context. Does not change this issue's gate. Opmark names are still untrustworthy; do not quote the broken ~50% concat/slice table or the workbench ~94 tok/s PP.
Owner

c177 opmark — 32k prefill per-op table (2-card TP=2, B8 workbench, named opmark)

This is the c177 re-run of the prefill opmark probe with the runtime-id↔name realignment in place (exact-stream op naming), following the c169 finding that the earlier opmark names were not trustworthy. Workbench run: no served-speed number.

Run: traced profile, ctx=32768, prefill wall 5245.4 ms, device busy 5010.4 ms, 16 chunks, aiclk ~1337 MHz. Arm: wb-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-opmark. Record: bench/runs/prefill-opmark-20261003T135353Z.named.txt (logits 2f26a3431057c087).

Formulas (as printed in the record): peak = cores × 4096 FLOP/cycle × AICLK ÷ phases (LoFi 1, HiFi2 2); bfp4 full precision at LoFi, bfp8 full precision needs HiFi2 (peak/2); FLOPs = 2 × M × K × N per chip; SDPA = 4 × NH × D × S × (chunk_start + S/2) (causal).

Role summary (top ~10 by wall share):

role                            ms/chunk  calls    TF/s  %LoFi  %wall
swiglu (gate|up) [all_gather      77.98    64.0   299.6   62.1  23.79
qkvzab [all_gather_minimal_m      29.55    48.0   281.0   58.3   9.01
w2 [linear]                        29.39    64.0   397.5   72.5   8.96
gdn out colpar [all_gather_m       13.36    48.0   231.4   48.0   4.08
attn qkv [all_gather_minimal       9.12    16.1   264.7   54.9   2.78
attn:layer out colpar [all_g       4.61    16.0   223.4   46.3   1.41
5120x124160 [linear]                0.08     0.1     1.0      -   0.02
10240x2560 [linear]                 0.06     0.1   117.1      -   0.02
2048x2560 [matmul]                  0.00     0.1     0.2      -      -

Top 3 hot spots (of the 5245.4 ms traced prefill wall):

  1. swiglu gate|up — 23.79% wall (77.98 ms/chunk, 64 calls/chunk, 1218.4 µs/call, 88 cores, 299.6 TF/s, 62.1% of LoFi peak)
  2. GDN chunk_gated_delta_rule — 12.21% wall (40.02 ms/chunk, 48 calls/chunk, 833.7 µs/call; no matmul TF/s — the GDN scan kernel)
  3. qkvzab — 9.01% wall (29.55 ms/chunk, 48 calls/chunk, 615.5 µs/call, 88 cores, 281.0 TF/s, 58.3% of LoFi peak)

Full per-op table (all ops, named):

op                                       sub        calls  ms/chunk   us/call cores    TF/s  %LoFi %HiFi2  %wall  sig
experimental.all_gather_minimal_matmul_a mlp         64.0     77.98    1218.4    88   299.6   62.1      -  23.79  in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x17408:BFLOAT4_B;pc=MinimalMatmu
transformer.chunk_gated_delta_rule       gdn         48.0     40.02     833.7     -       -      -      -  12.21  in=1x2048x1024:BFLOAT16,1x2048x1024:BFLOAT16,1x2048x3072:BFLOAT16,1x2048x24:BFLOAT16;pc=Ch
experimental.all_gather_minimal_matmul_a gdn         48.0     29.55     615.5    88   281.0   58.3      -   9.01  in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x8248:BFLOAT4_B;pc=MinimalMatmul
linear                                   mlp         64.0     29.39     459.2   100   397.5   72.5      -   8.96  in=1x1x2048x8704:BFLOAT8_B,8704x5120:BFLOAT4_B;pc=MatmulMultiCoreReuseMultiCastProgramConf
transformer.chunked_scaled_dot_product_a attn:laye   16.0     25.83    1614.4   110       -      -      -   7.88  in=input_tensor_q=1x12x2048x256:BFLOAT8_B,input_tensor_k=12297x2x64x256:BFLOAT8_B,input_te
experimental.reduce_scatter_minimal_asyn mlp         64.0     15.94     249.1     -       -      -      -   4.86  in=1x1x2048x5120:BFLOAT8_B;num_links=2;dim=3
experimental.all_gather_minimal_matmul_a gdn         48.0     13.36     278.4    88   231.4   48.0      -   4.08  in=input_tensor=1x1x2048x3072:BFLOAT8_B,weight_tensor=6144x2560:BFLOAT4_B;pc=MinimalMatmul
experimental.kda.qkv_causal_conv1d_silu  gdn         48.0     11.33     236.0     -       -      -      -   3.46  in=1x2048x5120:BFLOAT16,1x3x5120:BFLOAT16,1x1x5120:BFLOAT16,1x1x5120:BFLOAT16;pc=QkvCausal
experimental.all_gather_minimal_matmul_a attn:laye   16.0      9.08     567.6    88   264.9   54.9      -   2.77  in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x7168:BFLOAT4_B;pc=MinimalMatmul
rms_norm_post_all_gather                 gdn:layer   96.0      8.23      85.8     -       -      -      -   2.51  in=1x1x2048x2560:BFLOAT16,1x1x2048x64:BFLOAT16,weight=1x1x80x32:BFLOAT16;fid=HiFi2;dtype=B
to_layout                                gdn         48.0      4.75      99.0     -       -      -      -   1.45  in=1x2048x5120:BFLOAT16
experimental.all_gather_minimal_matmul_a attn:laye   16.0      4.61     288.4    88   223.4   46.3      -   1.41  in=input_tensor=1x1x2048x3072:BFLOAT8_B,weight_tensor=6144x2560:BFLOAT4_B;pc=MinimalMatmul
slice                                    gdn        144.0      4.18      29.0     -       -      -      -   1.27  in=1x2048x8248:BFLOAT16
rms_norm_pre_all_gather                  gdn:layer   96.0      4.00      41.7     -       -      -      -   1.22  in=1x1x2048x2560:BFLOAT16;fid=HiFi2;dtype=BFLOAT16
rms_norm                                 gdn         48.0      3.46      72.1     -       -      -      -   1.06  in=24x2048x128:FLOAT32,weight=1x1x128:BFLOAT16
silu                                     gdn         48.0      2.94      61.1     -       -      -      -    0.9  in=1x2048x3072:BFLOAT16
add                                      gdn:layer   48.0      2.87      59.7     -       -      -      -   0.87  in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT8_B
rms_norm_post_all_gather                 attn:laye   32.0      2.74      85.7     -       -      -      -   0.84  in=1x1x2048x2560:BFLOAT16,1x1x2048x64:BFLOAT16,weight=1x1x80x32:BFLOAT16;fid=HiFi2;dtype=B
add                                      gdn:layer   48.0      2.62      54.6     -       -      -      -    0.8  in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16
experimental.nlp_concat_heads            gdn         48.0      2.62      54.5     -       -      -      -    0.8  in=1x24x2048x128:FLOAT32
multiply                                 gdn         48.0      2.19      45.7     -       -      -      -   0.67  in=1x2048x3072:FLOAT32,1x2048x3072:BFLOAT16;dtype=BFLOAT16
rms_norm_pre_all_gather                  attn:laye   32.0      1.34      41.8     -       -      -      -   0.41  in=1x1x2048x2560:BFLOAT16;fid=HiFi2;dtype=BFLOAT16
experimental.all_gather_async            gdn:layer   96.0      1.31      13.7     -       -      -      -    0.4  in=1x1x2048x32:BFLOAT16;num_links=1;dim=3
add                                      attn:laye   16.0      1.12      70.3     -       -      -      -   0.34  in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16
typecast                                 gdn         48.0      1.00      20.8     -       -      -      -    0.3  in=1x1x2048x3072:BFLOAT16
experimental.nlp_create_qkv_heads        attn:laye   16.0      0.98      61.2     -       -      -      -    0.3  in=1x1x2048x3072:BFLOAT16,1x1x2048x1024:BFLOAT16
add                                      attn:laye   16.0      0.96      60.2     -       -      -      -   0.29  in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT8_B
sigmoid                                  attn:laye   16.0      0.94      58.5     -       -      -      -   0.29  in=1x1x2048x3072:BFLOAT16
experimental.nlp_concat_heads            attn:laye   16.0      0.66      41.4     -       -      -      -    0.2  in=1x12x2048x256:BFLOAT8_B
rms_norm                                 attn:laye   16.0      0.54      34.0     -       -      -      -   0.17  in=1x12x2048x256:BFLOAT16,weight=1x1x256:BFLOAT16
experimental.all_gather_async            attn:laye   32.0      0.47      14.8     -       -      -      -   0.14  in=1x1x2048x32:BFLOAT16;num_links=1;dim=3
multiply                                 attn:laye   16.0      0.45      27.9     -       -      -      -   0.14  in=1x1x2048x3072:BFLOAT8_B,1x1x2048x3072:BFLOAT16
to_layout                                gdn         96.0      0.44       4.6     -       -      -      -   0.13  in=1x3x5120:BFLOAT16
concat                                   attn:laye   32.0      0.42      13.1     -       -      -      -   0.13  dim=-1
experimental.rotary_embedding_hf         attn:laye   16.0      0.42      26.3     -       -      -      -   0.13  in=1x12x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16
copy                                     gdn         48.0      0.40       8.3     -       -      -      -   0.12  in=1x24x128x128:FLOAT32,1x24x128x128:BFLOAT16
typecast                                 gdn         48.0      0.38       7.9     -       -      -      -   0.12  in=1x24x128x128:BFLOAT16
slice                                    attn:laye   32.0      0.37      11.4     -       -      -      -   0.11  in=1x12x2048x256:BFLOAT16
typecast                                 attn:laye   16.0      0.33      20.7     -       -      -      -    0.1  in=1x12x2048x256:BFLOAT16;dtype=BFLOAT8_B
add                                      gdn         48.0      0.23       4.9     -       -      -      -   0.07  in=1x2048x24:BFLOAT16,1x1x24:BFLOAT16
multiply                                 gdn         48.0      0.21       4.4     -       -      -      -   0.06  in=1x1x24:BFLOAT16,1x2048x24:BFLOAT16
rms_norm                                 attn:laye   16.0      0.20      12.4     -       -      -      -   0.06  in=1x2x2048x256:BFLOAT16,weight=1x1x256:BFLOAT16
concat                                   model       12.0      0.20      16.4     -       -      -      -   0.06  dim=1
slice                                    model       12.0      0.16      13.7     -       -      -      -   0.05  in=1x8x5120:BFLOAT16
typecast                                 attn:laye   32.0      0.15       4.7     -       -      -      -   0.05  in=1x2x2048x256:BFLOAT16
experimental.rotary_embedding_hf         attn:laye   16.0      0.14       8.8     -       -      -      -   0.04  in=1x2x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16
slice                                    gdn         96.0      0.14       1.4     -       -      -      -   0.04  in=1x2048x56:BFLOAT16
copy                                     gdn         48.0      0.12       2.5     -       -      -      -   0.04  in=1x3x5120:BFLOAT16,1x3x5120:BFLOAT16
sigmoid                                  gdn         48.0      0.12       2.4     -       -      -      -   0.03  in=1x2048x24:BFLOAT16
concat                                   model        3.06      0.11      36.8     -       -      -      -   0.03  dim=0
copy                                     model        3.0      0.10      34.5     -       -      -      -   0.03  in=8x24x128x128:BFLOAT16,8x24x128x128:BFLOAT16
slice                                    model        3.0      0.10      33.7     -       -      -      -   0.03  in=8x24x128x128:BFLOAT16
experimental.paged_fill_cache            attn:laye   16.0      0.10       6.0     -       -      -      -   0.03  in=12297x2x64x256:BFLOAT8_B,1x2x2048x256:BFLOAT8_B,1x32:INT32
slice                                    attn:laye   32.0      0.09       2.9     -       -      -      -   0.03  in=1x2x2048x256:BFLOAT16
slice                                    gdn         48.0      0.09       1.8     -       -      -      -   0.03  in=1x2048x5120:BFLOAT16
linear                                   model       0.06      0.08    1263.0     -     1.0      -      -   0.02  in=1x1x1x5120:BFLOAT16,5120x124160:BFLOAT4_B
where                                    model        1.0      0.08      75.9     -       -      -      -   0.02  in=1x1x2048x1:BFLOAT16,1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16
slice                                    model        9.0      0.07       7.3     -       -      -      -   0.02  in=1x3x5120:BFLOAT16
experimental.paged_fill_cache            attn:laye   16.0      0.06       3.9     -       -      -      -   0.02  in=12297x2x64x256:BFLOAT4_B,1x2x2048x256:BFLOAT4_B,1x32:INT32
embedding                                model       1.06      0.06      59.0     -       -      -      -   0.02  in=1x2048:UINT32,1x1x248320x2560:BFLOAT16

Checks (all pass):

  • Coverage: 1.0 — 42320 profiler records matched to op names (≥95% criterion met).
  • Identity: eager_vs_traced_info: false — traced and eager outputs differ; this is the known WY/LoFi numerics class, not a regression. traced_opmark_vs_off: true — the opmark instrumentation does not change the traced output.
  • Must-fail: SDPA forced to HiFi2 moved sdpa_ms_per_chunk 25.83 → 38.59 (+49.4%), AGMM within −0.68% — names and fidelity knobs are acting on the right ops.

Note: this is a descriptive per-op attribution table — wall share, LoFi efficiency and per-call cost of each op at ctx=32768. It makes no served-speed claim (workbench profile, not the served path). It is the c177 re-run with exact-stream op naming, superseding the c169 broken-name table flagged in the comments above.

## c177 opmark — 32k prefill per-op table (2-card TP=2, B8 workbench, named opmark) This is the c177 re-run of the prefill opmark probe with the runtime-id↔name realignment in place (exact-stream op naming), following the c169 finding that the earlier opmark names were not trustworthy. Workbench run: **no served-speed number**. **Run:** traced profile, ctx=32768, **prefill wall 5245.4 ms**, device busy 5010.4 ms, 16 chunks, aiclk ~1337 MHz. Arm: `wb-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-opmark`. Record: `bench/runs/prefill-opmark-20261003T135353Z.named.txt` (logits `2f26a3431057c087`). Formulas (as printed in the record): peak = cores × 4096 FLOP/cycle × AICLK ÷ phases (LoFi 1, HiFi2 2); bfp4 full precision at LoFi, bfp8 full precision needs HiFi2 (peak/2); FLOPs = 2 × M × K × N per chip; SDPA = 4 × NH × D × S × (chunk_start + S/2) (causal). **Role summary (top ~10 by wall share):** ``` role ms/chunk calls TF/s %LoFi %wall swiglu (gate|up) [all_gather 77.98 64.0 299.6 62.1 23.79 qkvzab [all_gather_minimal_m 29.55 48.0 281.0 58.3 9.01 w2 [linear] 29.39 64.0 397.5 72.5 8.96 gdn out colpar [all_gather_m 13.36 48.0 231.4 48.0 4.08 attn qkv [all_gather_minimal 9.12 16.1 264.7 54.9 2.78 attn:layer out colpar [all_g 4.61 16.0 223.4 46.3 1.41 5120x124160 [linear] 0.08 0.1 1.0 - 0.02 10240x2560 [linear] 0.06 0.1 117.1 - 0.02 2048x2560 [matmul] 0.00 0.1 0.2 - - ``` **Top 3 hot spots (of the 5245.4 ms traced prefill wall):** 1. **swiglu gate|up** — 23.79% wall (77.98 ms/chunk, 64 calls/chunk, 1218.4 µs/call, 88 cores, 299.6 TF/s, 62.1% of LoFi peak) 2. **GDN `chunk_gated_delta_rule`** — 12.21% wall (40.02 ms/chunk, 48 calls/chunk, 833.7 µs/call; no matmul TF/s — the GDN scan kernel) 3. **qkvzab** — 9.01% wall (29.55 ms/chunk, 48 calls/chunk, 615.5 µs/call, 88 cores, 281.0 TF/s, 58.3% of LoFi peak) **Full per-op table (all ops, named):** ``` op sub calls ms/chunk us/call cores TF/s %LoFi %HiFi2 %wall sig experimental.all_gather_minimal_matmul_a mlp 64.0 77.98 1218.4 88 299.6 62.1 - 23.79 in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x17408:BFLOAT4_B;pc=MinimalMatmu transformer.chunk_gated_delta_rule gdn 48.0 40.02 833.7 - - - - 12.21 in=1x2048x1024:BFLOAT16,1x2048x1024:BFLOAT16,1x2048x3072:BFLOAT16,1x2048x24:BFLOAT16;pc=Ch experimental.all_gather_minimal_matmul_a gdn 48.0 29.55 615.5 88 281.0 58.3 - 9.01 in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x8248:BFLOAT4_B;pc=MinimalMatmul linear mlp 64.0 29.39 459.2 100 397.5 72.5 - 8.96 in=1x1x2048x8704:BFLOAT8_B,8704x5120:BFLOAT4_B;pc=MatmulMultiCoreReuseMultiCastProgramConf transformer.chunked_scaled_dot_product_a attn:laye 16.0 25.83 1614.4 110 - - - 7.88 in=input_tensor_q=1x12x2048x256:BFLOAT8_B,input_tensor_k=12297x2x64x256:BFLOAT8_B,input_te experimental.reduce_scatter_minimal_asyn mlp 64.0 15.94 249.1 - - - - 4.86 in=1x1x2048x5120:BFLOAT8_B;num_links=2;dim=3 experimental.all_gather_minimal_matmul_a gdn 48.0 13.36 278.4 88 231.4 48.0 - 4.08 in=input_tensor=1x1x2048x3072:BFLOAT8_B,weight_tensor=6144x2560:BFLOAT4_B;pc=MinimalMatmul experimental.kda.qkv_causal_conv1d_silu gdn 48.0 11.33 236.0 - - - - 3.46 in=1x2048x5120:BFLOAT16,1x3x5120:BFLOAT16,1x1x5120:BFLOAT16,1x1x5120:BFLOAT16;pc=QkvCausal experimental.all_gather_minimal_matmul_a attn:laye 16.0 9.08 567.6 88 264.9 54.9 - 2.77 in=input_tensor=1x1x2048x2560:BFLOAT8_B,weight_tensor=5120x7168:BFLOAT4_B;pc=MinimalMatmul rms_norm_post_all_gather gdn:layer 96.0 8.23 85.8 - - - - 2.51 in=1x1x2048x2560:BFLOAT16,1x1x2048x64:BFLOAT16,weight=1x1x80x32:BFLOAT16;fid=HiFi2;dtype=B to_layout gdn 48.0 4.75 99.0 - - - - 1.45 in=1x2048x5120:BFLOAT16 experimental.all_gather_minimal_matmul_a attn:laye 16.0 4.61 288.4 88 223.4 46.3 - 1.41 in=input_tensor=1x1x2048x3072:BFLOAT8_B,weight_tensor=6144x2560:BFLOAT4_B;pc=MinimalMatmul slice gdn 144.0 4.18 29.0 - - - - 1.27 in=1x2048x8248:BFLOAT16 rms_norm_pre_all_gather gdn:layer 96.0 4.00 41.7 - - - - 1.22 in=1x1x2048x2560:BFLOAT16;fid=HiFi2;dtype=BFLOAT16 rms_norm gdn 48.0 3.46 72.1 - - - - 1.06 in=24x2048x128:FLOAT32,weight=1x1x128:BFLOAT16 silu gdn 48.0 2.94 61.1 - - - - 0.9 in=1x2048x3072:BFLOAT16 add gdn:layer 48.0 2.87 59.7 - - - - 0.87 in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT8_B rms_norm_post_all_gather attn:laye 32.0 2.74 85.7 - - - - 0.84 in=1x1x2048x2560:BFLOAT16,1x1x2048x64:BFLOAT16,weight=1x1x80x32:BFLOAT16;fid=HiFi2;dtype=B add gdn:layer 48.0 2.62 54.6 - - - - 0.8 in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16 experimental.nlp_concat_heads gdn 48.0 2.62 54.5 - - - - 0.8 in=1x24x2048x128:FLOAT32 multiply gdn 48.0 2.19 45.7 - - - - 0.67 in=1x2048x3072:FLOAT32,1x2048x3072:BFLOAT16;dtype=BFLOAT16 rms_norm_pre_all_gather attn:laye 32.0 1.34 41.8 - - - - 0.41 in=1x1x2048x2560:BFLOAT16;fid=HiFi2;dtype=BFLOAT16 experimental.all_gather_async gdn:layer 96.0 1.31 13.7 - - - - 0.4 in=1x1x2048x32:BFLOAT16;num_links=1;dim=3 add attn:laye 16.0 1.12 70.3 - - - - 0.34 in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16 typecast gdn 48.0 1.00 20.8 - - - - 0.3 in=1x1x2048x3072:BFLOAT16 experimental.nlp_create_qkv_heads attn:laye 16.0 0.98 61.2 - - - - 0.3 in=1x1x2048x3072:BFLOAT16,1x1x2048x1024:BFLOAT16 add attn:laye 16.0 0.96 60.2 - - - - 0.29 in=1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT8_B sigmoid attn:laye 16.0 0.94 58.5 - - - - 0.29 in=1x1x2048x3072:BFLOAT16 experimental.nlp_concat_heads attn:laye 16.0 0.66 41.4 - - - - 0.2 in=1x12x2048x256:BFLOAT8_B rms_norm attn:laye 16.0 0.54 34.0 - - - - 0.17 in=1x12x2048x256:BFLOAT16,weight=1x1x256:BFLOAT16 experimental.all_gather_async attn:laye 32.0 0.47 14.8 - - - - 0.14 in=1x1x2048x32:BFLOAT16;num_links=1;dim=3 multiply attn:laye 16.0 0.45 27.9 - - - - 0.14 in=1x1x2048x3072:BFLOAT8_B,1x1x2048x3072:BFLOAT16 to_layout gdn 96.0 0.44 4.6 - - - - 0.13 in=1x3x5120:BFLOAT16 concat attn:laye 32.0 0.42 13.1 - - - - 0.13 dim=-1 experimental.rotary_embedding_hf attn:laye 16.0 0.42 26.3 - - - - 0.13 in=1x12x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16 copy gdn 48.0 0.40 8.3 - - - - 0.12 in=1x24x128x128:FLOAT32,1x24x128x128:BFLOAT16 typecast gdn 48.0 0.38 7.9 - - - - 0.12 in=1x24x128x128:BFLOAT16 slice attn:laye 32.0 0.37 11.4 - - - - 0.11 in=1x12x2048x256:BFLOAT16 typecast attn:laye 16.0 0.33 20.7 - - - - 0.1 in=1x12x2048x256:BFLOAT16;dtype=BFLOAT8_B add gdn 48.0 0.23 4.9 - - - - 0.07 in=1x2048x24:BFLOAT16,1x1x24:BFLOAT16 multiply gdn 48.0 0.21 4.4 - - - - 0.06 in=1x1x24:BFLOAT16,1x2048x24:BFLOAT16 rms_norm attn:laye 16.0 0.20 12.4 - - - - 0.06 in=1x2x2048x256:BFLOAT16,weight=1x1x256:BFLOAT16 concat model 12.0 0.20 16.4 - - - - 0.06 dim=1 slice model 12.0 0.16 13.7 - - - - 0.05 in=1x8x5120:BFLOAT16 typecast attn:laye 32.0 0.15 4.7 - - - - 0.05 in=1x2x2048x256:BFLOAT16 experimental.rotary_embedding_hf attn:laye 16.0 0.14 8.8 - - - - 0.04 in=1x2x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16,1x1x2048x64:BFLOAT16 slice gdn 96.0 0.14 1.4 - - - - 0.04 in=1x2048x56:BFLOAT16 copy gdn 48.0 0.12 2.5 - - - - 0.04 in=1x3x5120:BFLOAT16,1x3x5120:BFLOAT16 sigmoid gdn 48.0 0.12 2.4 - - - - 0.03 in=1x2048x24:BFLOAT16 concat model 3.06 0.11 36.8 - - - - 0.03 dim=0 copy model 3.0 0.10 34.5 - - - - 0.03 in=8x24x128x128:BFLOAT16,8x24x128x128:BFLOAT16 slice model 3.0 0.10 33.7 - - - - 0.03 in=8x24x128x128:BFLOAT16 experimental.paged_fill_cache attn:laye 16.0 0.10 6.0 - - - - 0.03 in=12297x2x64x256:BFLOAT8_B,1x2x2048x256:BFLOAT8_B,1x32:INT32 slice attn:laye 32.0 0.09 2.9 - - - - 0.03 in=1x2x2048x256:BFLOAT16 slice gdn 48.0 0.09 1.8 - - - - 0.03 in=1x2048x5120:BFLOAT16 linear model 0.06 0.08 1263.0 - 1.0 - - 0.02 in=1x1x1x5120:BFLOAT16,5120x124160:BFLOAT4_B where model 1.0 0.08 75.9 - - - - 0.02 in=1x1x2048x1:BFLOAT16,1x1x2048x2560:BFLOAT16,1x1x2048x2560:BFLOAT16 slice model 9.0 0.07 7.3 - - - - 0.02 in=1x3x5120:BFLOAT16 experimental.paged_fill_cache attn:laye 16.0 0.06 3.9 - - - - 0.02 in=12297x2x64x256:BFLOAT4_B,1x2x2048x256:BFLOAT4_B,1x32:INT32 embedding model 1.06 0.06 59.0 - - - - 0.02 in=1x2048:UINT32,1x1x248320x2560:BFLOAT16 ``` **Checks (all pass):** - **Coverage:** 1.0 — 42320 profiler records matched to op names (≥95% criterion met). - **Identity:** `eager_vs_traced_info: false` — traced and eager outputs differ; this is the known WY/LoFi numerics class, not a regression. `traced_opmark_vs_off: true` — the opmark instrumentation does not change the traced output. - **Must-fail:** SDPA forced to HiFi2 moved `sdpa_ms_per_chunk` 25.83 → 38.59 (+49.4%), AGMM within −0.68% — names and fidelity knobs are acting on the right ops. **Note:** this is a descriptive per-op attribution table — wall share, LoFi efficiency and per-call cost of each op at ctx=32768. It makes no served-speed claim (workbench profile, not the served path). It is the c177 re-run with exact-stream op naming, superseding the c169 broken-name table flagged in the comments above.
Member

Instrumentation delivered: QWEN36_OPMARK is on master (patches/prod-local-metal/models/demos/blackhole/qwen36/tt/opmark.py, banner in qwen36_vllm.py) with the named per-op table and must-fail; the efficiency follow-ons shipped (AGMM_BLOCKS swiglu 8x20, IN_L1FIT, GBS, FWO, SWIGLU_PACK in ship-cdr8g.toml); the residual PP gap is the pp10k lane + #209. Verified 2026-11-18.

Instrumentation delivered: QWEN36_OPMARK is on master (patches/prod-local-metal/models/demos/blackhole/qwen36/tt/opmark.py, banner in qwen36_vllm.py) with the named per-op table and must-fail; the efficiency follow-ons shipped (AGMM_BLOCKS swiglu 8x20, IN_L1FIT, GBS, FWO, SWIGLU_PACK in ship-cdr8g.toml); the residual PP gap is the pp10k lane + #209. Verified 2026-11-18.
Owner

agent-gateway closeout (closed): cleared agent:* labels.
Hermes kanban card (if any) is left for Hermes to archive/complete.

agent-gateway closeout (closed): cleared `agent:*` labels. Hermes kanban card (if any) is left for Hermes to archive/complete.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
bitpartner/tt-stack#151
No description provided.