FFN switches D1-D3: CUPTI window section deltas (D1 gain, D2 small gain, D3 loss) and report script
Reads the five independent windows CP/WD/WH/WW/WZ of request 29 (read-only on the server) per window rows T: D1 DOWN_SUB16 -0.21 ms per graph on F layers (resolved at every T), D2 HITS_IN_COMBINE -0.043 ms per graph (tail after the CPU rows, resolved), D3 WAIT_M_ROWS a resolved loss (kernel floor 1.4 us + 0.43 us per block). ffn_window_report.py extracts one trace per call (stdlib, lct.py) and prints the report with the noise estimates. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
31b00093b9
commit
ee9264c528
@@ -0,0 +1,945 @@
|
||||
# FFN switches D1, D2, D3: section deltas from the independent CUPTI windows (2026-11-11)
|
||||
|
||||
Source: `/data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/{CP,WD,WH,WW,WZ}.1/win-r29.lct` (job log
|
||||
`job-013924.log`; request 29 of the replay, 15 s windows, floor profile on the RTX 5090 server, binary
|
||||
`/data/leleka-e2e/spd-gap/bin-ffn-switches`, 2026-11-11 01:39 to 02:18). Read offline with
|
||||
`scripts/e2e/codex/speed/ffn_window_report.py` (stdlib, no GPU; the traces were only read on `rnr5090`, with `nice`, nothing
|
||||
was written there). Nothing here is an end-to-end result: these are section deltas inside the verify graph from CUPTI
|
||||
kernel timestamps. The e2e A/B stays the group A/B at the end of the stage. Identity and kernel probes already passed for
|
||||
all three switches (bytes identical, 2057/2057 rows, draft trace identical); this document is the performance half.
|
||||
|
||||
## 0. Answer first
|
||||
|
||||
| step | switch | what really ran | section delta (CUPTI, in-graph; negative = faster) | resolved | recommendation |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| D1 | `LELEKA_SM120_DOWN_SUB16` | WD vs CP | F-class layers (no PCIe leg, no CPU wait, about half of all layers): routed chain **-3.7 / -7.4 / -10.2 / -12.5 / -18.1 us per layer** at T 1..5 (VRAM-pass down -2.4 .. -10.3, PCIe-pass down -1.3 .. -7.2, PCIe gate/up -0.6 .. +0.1), FFN phase **-3.9 / -7.7 / -10.0 / -12.9 / -18.7 us (p50)**, **-0.137 / -0.219 / -0.234 / -0.157 / -0.208 ms per graph**, -0.214 ms at CP's T mix | yes, every T (noise 0.16 .. 2.43 us, se 0.5 .. 1.6 us) | **enable by default in the 5090 profiles** |
|
||||
| D2 | `LELEKA_SM120_HITS_IN_COMBINE` | WH vs CP | `add_hits` (48 launches a graph) gone, combine 1.50 -> 2.02 us: the tail after the CPU rows (copy end to combine end) **-0.86 / -0.86 / -0.90 / -0.90 / -0.93 us per layer, the same in classes F, C and X** = **-0.041 / -0.040 / -0.044 / -0.044 / -0.045 ms per graph** (48 layers), -0.043 at CP's T mix | yes, every T (noise of one device kernel 0.10 .. 0.16 us); the F-phase total (-0.8 .. -0.9 p50) is resolved at T 1-3 only (phase noise 0.45 .. 2.43) | **enable by default**; small (0.4 % of a T=3 graph); with S11 ON in the profiles the gain is smaller (estimate -0.5 us per layer, about -0.025 ms) |
|
||||
| D3 | `LELEKA_SM120_WAIT_M_ROWS` | WW vs CP | the fused wait+copy kernel is **longer** than wait M + copy rows: floor 2.7 -> 5.8 / 10.2 / 14.4 / 18.8 / 23.2 us at T 1..5 (**1.4 us + 0.43 us per block**, T x 10 blocks); F-class FFN phase **+3.3 / +7.4 / +12.6 / +17.3 / +21.8 us per layer (p50)**, **+0.118 / +0.175 / +0.276 / +0.191 / +0.275 ms per graph** (F layers only), +0.238 at CP's T mix; the waiting layers (class C) pay it too at T 4-5 (+14.8, +23.1 us) | yes, a LOSS, every T | **do not enable** (the PCIe polling cost upstream saw on Turing, much larger here) |
|
||||
|
||||
All three together (WZ): F-phase -1.5 / -1.3 / +0.1 / +2.3 / +0.6 us per layer (p50), -0.011 ms per graph at CP's mix,
|
||||
unresolved from T=3: D3's loss eats D1's gain. The expected result of **D1 + D2 without D3** is the sum of the two
|
||||
single deltas, about **-0.26 ms per graph** (D1 -0.214 on F layers, D2 -0.043 on all layers; no window of exactly D1+D2
|
||||
exists, so this is a prediction from the additive part, see the additivity check in section 6).
|
||||
|
||||
Noise used (details in section 2): one device kernel 0.10 .. 0.16 us (untouched hyper-connection and quantize kernels),
|
||||
F-class phase 0.16 / 0.45 / 0.83 / 1.41 / 2.43 us per layer at T 1..5 (the larger of the untouched-chain offset and the
|
||||
drift of the F phase p50 between the two halves of one window), standard error of a delta 0.25 .. 1.56 us.
|
||||
|
||||
## 1. What each window really ran (and a caution on the windows)
|
||||
|
||||
The variants are independent this time (the job unsets the switches between variants). Two independent evidences agree:
|
||||
the switch line the engine printed (`requested Sm120Switches` in each `engine.log`) and the kernel names launched in
|
||||
the verify graphs (launches per graph, all T; appendix section 1):
|
||||
|
||||
| window | engine log down_sub16 / hits_in_combine / wait_m_rows | kernels | really ran |
|
||||
| --- | --- | --- | --- |
|
||||
| CP | false / false / false | `window_moe_down_20` 78 + `_42` 18, `verify_wait_flag_ge` 96, `chain_copy_rows_from_mapped` 48, `add_hits` 48, `mtp_full_combine` 48 | none (the profile set; no COMBINE_VEC4 in this binary's run env) |
|
||||
| WD | true / false / false | `sm120_moe_down_20` 78 + `_42` 18, the rest as CP | D1 |
|
||||
| WH | false / true / false | `add_hits` 0, `leleka_verify_combine_k10_vec4_hits` 48, the rest as CP | D2 |
|
||||
| WW | false / false / true | `verify_wait_flag_ge` 48, `chain_copy_rows_from_mapped` 0, `leleka_verify_wait_copy_rows` 48, the rest as CP | D3 |
|
||||
| WZ | true / true / true | all three sets of names | D1 + D2 + D3 |
|
||||
|
||||
Windows are separate sessions with a different expert-tier state and a different T mix (graphs per T, kept graphs
|
||||
785 / 816 / 811 / 827 / 741; T6 has 17-22 graphs in CP and WD and is left out, T1 has 28-56):
|
||||
|
||||
| T | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| 1 | 28 | 56 | 34 | 44 | 33 |
|
||||
| 2 | 206 | 281 | 320 | 275 | 162 |
|
||||
| 3 | 253 | 40 | 175 | 285 | 208 |
|
||||
| 4 | 40 | 354 | 69 | 80 | 120 |
|
||||
| 5 | 231 | 45 | 167 | 73 | 101 |
|
||||
|
||||
So everything is compared per T inside one window pair, never as a mix. The thin cells are CP T=4 (40 graphs, 33 with F
|
||||
layers), WD T=3 (40) and T=5 (45), and T=1 everywhere (the half-window drift cannot be estimated there).
|
||||
|
||||
## 2. Method, classes and noise
|
||||
|
||||
Verify graph = at least 900 kernels per correlation id, first and last two dropped; T = grid of the CPU-row copy kernel
|
||||
/ 10 (also for the D3 kernel, whose grid is the same T x 10 blocks). Per layer the kernels from the doorbell start to
|
||||
the end of the combine are kept (`ffn_phase_timeline.py` logic). **The FFN phase ends at the combine end in every
|
||||
variant** (D2 removes `add_hits`, so "add_hits end" of the older notes does not exist there).
|
||||
|
||||
Layer classes (as in the FFN phase note): **F** no PCIe leg (wait B <= 3.5 us) and no CPU wait; **C** CPU rows late, no
|
||||
PCIe leg; **X** PCIe leg. D3 hides wait M inside its kernel, so the CPU-wait test is made the same way for every
|
||||
variant: the wait+copy region (wait M start to copy end, or the one D3 kernel) must be within 4 us of the 5th
|
||||
percentile of that region in the same window at the same T. The F/C/X split and the sizes of the deltas do not move
|
||||
with that threshold (floor + 1.5, 4, 8 us: D1 at T=3 -9.95 / -9.95 / -9.98 us p50, D3 +12.54 / +12.58 / +12.58, D2 -0.93
|
||||
/ -0.93 / -0.90).
|
||||
|
||||
There is no repeat window of one configuration, so the noise is estimated four ways (appendix section 3):
|
||||
|
||||
* (a) kernels no switch touches. Device-only kernels (`chain_gr_split`, `chain_gr_down_t2w8_nb4`, `chain_gr_up8`,
|
||||
`quantize_q8_1`): the per-launch p50 differs between any two windows by at most 0.00-0.16 us (0.10 / 0.10 / 0.13 / 0.13 /
|
||||
0.16 at T 1..5; the up8 kernel is the largest). Host-dependent kernels (doorbell, plan wait) move by up to 4.1 us and 0.5
|
||||
us and are not used as controls.
|
||||
* (a2) the same idea inside the F-class chain: the sum of the p50 differences of DB, EQ, WA, V_GU, WB (kernels no
|
||||
switch touches) between CP and a variant: at most 0.13 / 0.45 / 0.77 / 0.64 / 0.90 us per layer at T 1..5 (WZ has the
|
||||
largest offset at T=2,3: V_GU 0.5-0.7 us lower; the single-switch windows are within 0.4 us at T 1-3 and up to 0.9 at T 4-5).
|
||||
* (d) drift inside one window: F phase p50 of the first half of the graphs minus the second half, 0.0-0.8 us at T 1-3, up
|
||||
to 1.4 at T=4 (WZ) and 2.4 at T=5 (WD, 45 graphs).
|
||||
* (b) standard error: the F-class phase mean over graphs has se 0.10-0.90 us per window (1.47 at WD T=5); a delta's se is
|
||||
0.25-1.56 us.
|
||||
* **Noise used for an F-phase verdict = the larger of (a2) and (d)**: 0.16 / 0.45 / 0.83 / 1.41 / 2.43 us per layer at T
|
||||
1..5. For tier-independent single kernels and for the tail after the copy the noise is (a): 0.10 / 0.10 / 0.13 / 0.13 /
|
||||
0.16 us.
|
||||
* (c) additivity of WZ is in section 6.
|
||||
|
||||
Verdict rule (as for S11/S9/U5a): resolved when p50 and mean agree in sign, |mean delta| is above two standard errors and
|
||||
both are above the noise. Per graph = the mean delta x the number of layers it applies to (F layers per graph in CP:
|
||||
32.3 / 26.8 / 22.3 / 11.4 / 12.3 at T 1..5; or 48 for the tail, which every layer has).
|
||||
|
||||
## 3. D1 `DOWN_SUB16` (WD against CP)
|
||||
|
||||
Launches per graph are unchanged: 96 down launches (78 type-20 and 18 type-42; 48 VRAM pass and 48 PCIe pass) and 96
|
||||
gate/up launches. Names change `window_moe_down_20/_42` -> `sm120_moe_down_20/_42`. The grid shows both passes (T=3,
|
||||
x by y blocks; y = T x 10 rows):
|
||||
|
||||
| launch | CP | WD (D1) |
|
||||
| --- | --- | --- |
|
||||
| VRAM-pass down, type 20 / 42 | 320 x 30 / 320 x 30 | **80 x 30 / 160 x 30** |
|
||||
| PCIe-pass down, type 20 / 42 | 320 x 30 (full grid, usually empty) | **80 x 4 / 160 x 4** |
|
||||
| PCIe-pass gate/up (`sm120_moe_gu_swiglu_*`, second launch) | 20 x 30 | **20 x 4** |
|
||||
|
||||
Per launch p50 in F-class layers (us) and the delta to CP:
|
||||
|
||||
| T | VRAM-pass down CP -> WD | PCIe-pass down CP -> WD | PCIe gate/up CP -> WD | routed chain (V_GU start to PCIe down end) delta | FFN phase delta p50 / mean (se) | per graph |
|
||||
| --- | --- | --- | --- | ---: | --- | ---: |
|
||||
| 1 | 10.62 -> 8.22 (-2.40) | 1.92 -> 0.64 (-1.28) | 0.74 -> 0.70 (-0.03) | -3.74 | -3.90 / -4.23 (0.82) | -0.137 ms |
|
||||
| 2 | 15.11 -> 11.52 (-3.59) | 3.42 -> 0.67 (-2.75) | 1.47 -> 1.18 (-0.29) | -7.36 | -7.71 / -8.17 (0.46) | -0.219 ms |
|
||||
| 3 | 19.33 -> 14.05 (-5.28) | 5.50 -> 0.64 (-4.86) | 1.09 -> 1.18 (+0.10) | -10.18 | -9.95 / -10.49 (0.48) | -0.234 ms |
|
||||
| 4 | 23.84 -> 16.57 (-7.27) | 7.01 -> 0.64 (-6.37) | 1.22 -> 1.18 (-0.03) | -12.54 | -12.86 / -13.71 (0.80) | -0.157 ms |
|
||||
| 5 | 28.42 -> 18.11 (-10.30) | 7.90 -> 0.67 (-7.23) | 1.31 -> 0.74 (-0.58) | -18.05 | -18.69 / -16.98 (1.56) | -0.208 ms |
|
||||
|
||||
Noise (F phase) 0.16 / 0.45 / 0.83 / 1.41 / 2.43: resolved at every T. The routed-chain total per layer at T=3 goes
|
||||
from 48.9 us (V_GU 23.0 + V_DN 19.3 + P_GU 1.1 + P_DN 5.5) to 38.9 us; the FFN phase falls by the same amount (-10.0
|
||||
p50), so the saving is not absorbed by the shared-expert side chain at these T (the design note's cap did not bind). The
|
||||
measured per-graph value at CP's T mix, **-0.214 ms** (se 0.008), is inside the design range 0.17-0.23 ms (S7), and the
|
||||
per-layer values agree with the design's 3.5 / 4.9 / 4.7 us averaged over all layers at T 2/3/4 (measured on F layers
|
||||
times the F share: 4.3 / 4.6 / 3.0 us).
|
||||
|
||||
Where it counts and where it does not:
|
||||
|
||||
* The gain is only on the F layers. In layers with a CPU wait (C) or a PCIe leg (X) the kernels are faster too (X layers,
|
||||
T=3 p50: VRAM-pass down 18.3 -> 11.5, PCIe-pass down with real work 5.0 -> 2.8, 8.7 -> 2.8 at T=5, PCIe gate/up 6.9 -> 6.9,
|
||||
so 4 rows are not slower with real work), but the phase of those layers is the arrival of the CPU rows and the delta of
|
||||
the phase is not resolved (C and X deltas change sign with T and are inside the tier-state spread, appendix section 8).
|
||||
The per-graph number therefore counts F layers only.
|
||||
* The whole-graph FFN phase and the graph duration cannot show this (section 6).
|
||||
|
||||
## 4. D2 `HITS_IN_COMBINE` (WH against CP)
|
||||
|
||||
`add_hits_kernel` (48 per graph, 1.22 / 1.22 / 1.31 / 1.31 / 1.34 us p50 at T 1..5) is gone; the combine
|
||||
`mtp_full_combine` (1.47 / 1.50 / 1.50 / 1.50 / 1.54 us) becomes `leleka_verify_combine_k10_vec4_hits` (1.92 / 1.98 /
|
||||
2.02 / 2.02 / 2.05 us, +0.45 .. +0.52). Kernel time of the pair at T=3: 2.81 -> 2.02 us (-0.79 us per layer).
|
||||
|
||||
The tail after the last wait (copy end to combine end, p50 us; it is the same device work in every layer and does not
|
||||
depend on the tier), CP -> WH, the delta, and the mean-based per-graph value over 48 layers:
|
||||
|
||||
| T | class F | class C | class X | all layers | per graph (all, mean) | noise of one kernel |
|
||||
| --- | --- | --- | --- | --- | ---: | ---: |
|
||||
| 1 | 2.88 -> -0.86 | 2.85 -> -0.83 | 2.91 -> -0.90 | 2.88 -> -0.86 | -0.041 ms | 0.10 |
|
||||
| 2 | 2.94 -> -0.86 | 2.94 -> -0.86 | 2.94 -> -0.86 | 2.94 -> -0.86 | -0.040 ms | 0.10 |
|
||||
| 3 | 3.01 -> -0.90 | 3.01 -> -0.93 | 3.01 -> -0.93 | 3.01 -> -0.93 | -0.044 ms | 0.13 |
|
||||
| 4 | 3.01 -> -0.90 | 3.01 -> -0.93 | 3.01 -> -0.93 | 3.01 -> -0.90 | -0.044 ms | 0.13 |
|
||||
| 5 | 3.07 -> -0.93 | 3.07 -> -0.93 | 3.07 -> -0.96 | 3.07 -> -0.93 | -0.045 ms | 0.16 |
|
||||
|
||||
Resolved at every T and in every class (the tail is after the last wait, so waiting layers pay for `add_hits` too). The
|
||||
F-class FFN phase agrees but is nearer the noise: p50 -0.77 / -0.90 / -0.93 / -0.10 / -1.12, mean -1.79 / -1.58 / -1.02
|
||||
/ -1.24 / -1.09 us (se 0.27-0.85); resolved at T 1-3 (against noise 0.16 / 0.45 / 0.83), not at T 4-5 (noise 1.41 /
|
||||
2.43, which is the drift of other windows at those T, not a property of the kernel). The tail, being tier independent,
|
||||
is the number to use: **-0.043 ms per graph at CP's T mix**.
|
||||
|
||||
With COMBINE_VEC4 (S11) ON, as the profiles have it now, the old pair is `add_hits` 1.31 + vec4 combine 1.15 = 2.46 us
|
||||
against the 2.02 us of the `_hits` kernel (this binary's `_hits` kernel ran without S11), so the gain is estimated at
|
||||
-0.5 us per layer, about -0.025 ms per graph. This is an estimate from the two single windows, not a measurement; the
|
||||
orchestrator's next window with the updated profile will show it as `leleka_verify_combine_k10_vec4` + `add_hits` ->
|
||||
`leleka_verify_combine_k10_vec4_hits`.
|
||||
|
||||
## 5. D3 `WAIT_M_ROWS` (WW against CP): a loss
|
||||
|
||||
`verify_wait_flag_ge_kernel` (96 per graph) loses its second launch (48) and `chain_copy_rows_from_mapped_kernel`
|
||||
(48) is replaced by `leleka_verify_wait_copy_rows` (48; grid T x 10 blocks of 128 threads, 72 registers). Wait M plus
|
||||
copy in an F layer took a floor of 2.72 us (a single-thread wait of 1.4 us, then the copy of 1.3 us) at every T; the
|
||||
fused kernel takes, with the flag already set:
|
||||
|
||||
| T (blocks) | CP wait M + copy (F, p50 us) | WW wait+copy (F, p50) | delta | WZ (with D1, D2) | 5th percentile of WW |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| 1 (10) | 2.78 | 6.08 | +3.30 | 6.02 | 5.82 |
|
||||
| 2 (20) | 3.52 | 10.66 | +7.14 | 10.34 | 10.18 |
|
||||
| 3 (30) | 2.82 | 14.75 | +11.94 | 14.62 | 14.43 |
|
||||
| 4 (40) | 2.78 | 19.04 | +16.26 | 18.94 | 18.75 |
|
||||
| 5 (50) | 3.58 | 23.68 | +20.10 | 23.27 | 23.17 |
|
||||
|
||||
The floor of the D3 kernel is linear in the number of blocks: **1.44 us + 0.433 us per block** (least squares through the
|
||||
5th percentile, T 1..8, WW and WZ, 15 points; each block polls the flag in host-mapped memory over PCIe). This is the
|
||||
cost that upstream saw on Turing ("every row block polls the flag over PCIe", -1.5 % decode there); on the 5090 it is
|
||||
2 to 7 times longer than the two kernels it replaces and grows with T. The p5 and p25 of the kernel at one T are within
|
||||
0.3-0.5 us of each other, so it is a mechanical floor, not a late arrival of the CPU rows.
|
||||
|
||||
The F-class FFN phase follows exactly (wait M start to combine end: 5.70 -> 8.96 / 6.37 -> 13.60 / 5.86 -> 17.79 / 5.82
|
||||
-> 22.08 / 6.69 -> 26.78 us; the tail after the kernel is unchanged, +0.03):
|
||||
|
||||
| T | d p50 | d mean (se) | noise | per graph (F layers) | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | --- |
|
||||
| 1 | +3.26 | +3.65 (1.17) | 0.16 | +0.118 ms | resolved LOSS |
|
||||
| 2 | +7.42 | +6.54 (0.45) | 0.45 | +0.175 ms | resolved LOSS |
|
||||
| 3 | +12.58 | +12.38 (0.25) | 0.83 | +0.276 ms | resolved LOSS |
|
||||
| 4 | +17.28 | +16.69 (0.88) | 1.41 | +0.191 ms | resolved LOSS |
|
||||
| 5 | +21.79 | +22.48 (0.96) | 2.43 | +0.275 ms | resolved LOSS |
|
||||
| CP mix | +13.89 | +13.77 | | **+0.238 ms (se 0.005)** | |
|
||||
|
||||
The waiting layers pay too. Class C (CPU rows late, no PCIe leg), phase delta to CP, p50 / mean (se): WW T=4 +14.8 /
|
||||
+14.3 (3.1), T=5 +23.1 / +21.4 (2.1), T=3 +10.7 / +11.2 (1.4), T=2 +6.0 / +1.6 (1.8); WZ (also D3) +14.9, +13.2, +9.3, +5.6;
|
||||
the windows without D3 (WD, WH) move by -3.1 .. +4.3 (T=2, 4, 5) and +9.7 / +4.1 (T=3, WD thin). At T 4-5 that is the same
|
||||
size as the F-class loss, so if every layer pays the polling cost the graph loss is up to 48 x the kernel delta,
|
||||
**0.16 / 0.34 / 0.57 / 0.78 / 0.96 ms at T 1..5** (the resolved lower bound is the F-only column above). Either way it
|
||||
is a loss at every T.
|
||||
|
||||
Direction for a retry (not tested here): one polling block per window row or a single elected poller with the flag
|
||||
relayed through device memory, so that the number of PCIe reads does not grow with T x 10; the switch stays OFF until a
|
||||
window shows a floor near the 2.7 us of the two kernels it replaces.
|
||||
|
||||
## 6. FFN phase per layer class F, additivity and totals
|
||||
|
||||
The F-class FFN phase (doorbell start to combine end), p50 us per layer, per T and window, with the per-layer delta to
|
||||
CP (p50 / mean, se of the delta) and the verdict; per-switch sections 3-5 quote the same numbers:
|
||||
|
||||
| T | CP | WD (D1) | WH (D2) | WW (D3) | WZ (all) |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| 1 | 41.63 | 37.73 (-3.90 / -4.23, se 0.82) | 40.86 (-0.77 / -1.79, 0.74) | 44.90 (+3.26 / +3.65, 1.17) | 40.16 (-1.47 / -1.69, 0.79) |
|
||||
| 2 | 54.27 | 46.56 (-7.71 / -8.17, 0.46) | 53.38 (-0.90 / -1.58, 0.47) | 61.70 (+7.42 / +6.54, 0.45) | 52.93 (-1.34 / -1.85, 0.47) |
|
||||
| 3 | 65.67 | 55.71 (-9.95 / -10.49, 0.48) | 64.74 (-0.93 / -1.02, 0.27) | 78.24 (+12.58 / +12.38, 0.25) | 65.79 (+0.13 / -0.33, 0.29) |
|
||||
| 4 | 75.01 | 62.15 (-12.86 / -13.71, 0.80) | 74.91 (-0.10 / -1.24, 0.85) | 92.29 (+17.28 / +16.69, 0.88) | 77.31 (+2.30 / +0.95, 0.87) |
|
||||
| 5 | 87.71 | 69.03 (-18.69 / -16.98, 1.56) | 86.59 (-1.12 / -1.09, 0.70) | 109.50 (+21.79 / +22.48, 0.96) | 88.29 (+0.58 / +1.82, 0.81) |
|
||||
|
||||
Verdicts (appendix section 5-6): D1 resolved gain at T 1-5; D3 resolved loss at T 1-5; D2 resolved gain at T 1-3 and
|
||||
unresolved at T 4-5 (its tail, above, is resolved everywhere); WZ resolved gain at T 1-2 only.
|
||||
|
||||
**Additivity check (c).** WZ against the sum of the single-switch deltas (p50 / mean, us per layer): residual -0.06 /
|
||||
+0.68 (T=1), -0.16 / +1.36 (T=2), -1.57 / -1.19 (T=3), -2.02 / -0.79 (T=4), -1.41 / -2.58 (T=5). It adds up within
|
||||
about 1.4 us at T 1-2 and misses by 1.2-2.6 us at T 3-5 (WZ is the faster side: its D3 loss is 1-2 us smaller than WW's,
|
||||
and its V_GU is 0.5-0.7 us lower than CP's, which is part of the session offset of section 2). That miss is of the size of
|
||||
the noise used at T 3-5 (0.83 / 1.41 / 2.43), so the single-switch deltas are additive to the noise; it is also a reminder
|
||||
that a single F-phase p50 is good to about a microsecond per layer, which is why the D2 verdict leans on the tail.
|
||||
|
||||
**Whole-graph totals are tier-state confounded again.** The class mix term (share of F/C/X layers per session) is +/-0.05
|
||||
.. 2.5 ms per graph in these windows (mostly above 0.2), as large as every switch effect combined: for example WD at T=3 has "within F"
|
||||
-0.237 ms but a total of +2.44 ms (class mix +1.86: 30 % X layers against 17 % in CP), at T=4 the totals of all four
|
||||
variants are -1.7 .. -3.7 ms from a different mix. Graph durations (appendix section 9) differ from CP by -2.2 .. +1.0
|
||||
ms with no relation to the switches (WD T=4 -2.2 ms, WH T=3 +0.65 ms, WW T=5 +1.0 ms): the same 0.2-1.4 ms session noise as
|
||||
in the S11/S9/U5a windows. Neither can decide anything; only the section deltas above can.
|
||||
|
||||
## 7. Recommendation
|
||||
|
||||
* **D1: enable by default in the 5090 profiles.** Resolved gain at every T: -0.14 .. -0.23 ms per graph, -0.214 ms at CP's
|
||||
mix, about 2 % of a T=3 graph (11.1 ms, CP p50; session dependent). It applies to the F layers (about half), because
|
||||
the device chain of waiting layers is hidden under the arrival of the CPU rows.
|
||||
* **D2: enable by default.** Resolved on the tier-independent tail at every T and class: -0.043 ms per graph (about 0.4 %),
|
||||
roughly -0.025 ms with S11 on. Small, free, bitwise.
|
||||
* **D3: do not enable.** Resolved loss at every T (+0.12 .. +0.28 ms per graph on F layers alone, up to +0.9 ms if every
|
||||
layer pays), floor 1.4 + 0.43 us per block. Keep the switch OFF; a retry needs a different polling structure.
|
||||
* **D1 + D2 together:** about -0.26 ms per graph by addition (no window of exactly that pair; WZ includes D3 and cannot
|
||||
show it). A confirming window of the profile set with S11, D1 and D2 against the profile set is the cheap way to
|
||||
record it; its section deltas are the F-phase rows (`FFN phase` in F layers, expect about -8.6 / -10.9 / -13 us per layer at T 2 /
|
||||
3 / 4) and the tail after the copy (expect about -0.55 us per layer with S11 on).
|
||||
* Not decided here: how much of this survives in the e2e agent workload (the group A/B), and any effect through the side
|
||||
streams (the side chains run concurrent kernels whose durations are inside the figures above).
|
||||
|
||||
## Reproduce
|
||||
|
||||
```
|
||||
R=/data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows
|
||||
S=scripts/e2e/codex/speed/ffn_window_report.py
|
||||
for v in CP WD WH WW WZ; do
|
||||
ssh rnr5090 "nice -n 19 python3 -B - extract $R/$v.1/win-r29.lct $v - --engine-log $R/$v.1/engine.log" < $S > $v.json.gz
|
||||
done
|
||||
python3 $S report CP.json.gz WD.json.gz WH.json.gz WW.json.gz WZ.json.gz > report.md
|
||||
```
|
||||
|
||||
Each extract takes about 10 s of one CPU core on the server and writes nothing there (`lct.py` may write its
|
||||
demangled-name cache next to the trace, as for every reader); the derived `*.json.gz` (about 5 MB each) are not
|
||||
committed. Method limits: kernel durations are CUPTI timestamps; the role of a kernel is its family name and order inside
|
||||
the layer (first gate/up and down launch = VRAM pass, second = PCIe pass); the class thresholds are relative to the
|
||||
window's own floor; the per-graph numbers scale with the F layers per graph of the CP session (32 / 27 / 22 / 11 / 12 at
|
||||
T 1..5), which is itself session dependent; no repeat window exists, so the noise is an estimate (section 2).
|
||||
|
||||
## Appendix: full output of `ffn_window_report.py report`
|
||||
|
||||
Windows: CP = /data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/CP.1/win-r29.lct, WD = /data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/WD.1/win-r29.lct, WH = /data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/WH.1/win-r29.lct, WW = /data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/WW.1/win-r29.lct, WZ = /data/leleka-e2e/spd-gap/runs/verify-ffn-d1-d2-d3-cupti-windows/WZ.1/win-r29.lct
|
||||
T compared (at least 25 graphs in all five windows): [1, 2, 3, 4, 5]
|
||||
|
||||
### 1. What each window really ran
|
||||
|
||||
Switch line of `engine.log` (`requested Sm120Switches`) and the kernels launched per verify graph.
|
||||
|
||||
| window | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| engine log down_sub16 | false | true | false | false | true |
|
||||
| engine log hits_in_combine | false | false | true | false | true |
|
||||
| engine log wait_m_rows | false | false | false | true | true |
|
||||
| engine log combine_vec4 | false | false | false | false | false |
|
||||
| `window_moe_down_20` per graph | 78.00 | 0.00 | 78.00 | 78.00 | 0.00 |
|
||||
| `window_moe_down_42` per graph | 18.00 | 0.00 | 18.00 | 18.00 | 0.00 |
|
||||
| `sm120_moe_down_20` per graph | 0.00 | 78.00 | 0.00 | 0.00 | 78.00 |
|
||||
| `sm120_moe_down_42` per graph | 0.00 | 18.00 | 0.00 | 0.00 | 18.00 |
|
||||
| `add_hits` per graph | 48.00 | 48.00 | 0.00 | 48.00 | 0.00 |
|
||||
| `mtp_full_combine` per graph | 48.00 | 48.00 | 0.00 | 48.00 | 0.00 |
|
||||
| `leleka_verify_combine_k10_vec4_hits` per graph | 0.00 | 0.00 | 48.00 | 0.00 | 48.00 |
|
||||
| `verify_wait_flag_ge` per graph | 96.00 | 96.00 | 96.00 | 48.00 | 48.00 |
|
||||
| `chain_copy_rows_from_mapped` per graph | 48.00 | 48.00 | 48.00 | 0.00 | 0.00 |
|
||||
| `leleka_verify_wait_copy_rows` per graph | 0.00 | 0.00 | 0.00 | 48.00 | 48.00 |
|
||||
| verify graphs kept | 785 | 816 | 811 | 827 | 741 |
|
||||
|
||||
### 2. Verify graphs per window rows T (kept graphs; a T with fewer than 25 is not compared)
|
||||
|
||||
| T | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| 1 | 28 | 56 | 34 | 44 | 33 |
|
||||
| 2 | 206 | 281 | 320 | 275 | 162 |
|
||||
| 3 | 253 | 40 | 175 | 285 | 208 |
|
||||
| 4 | 40 | 354 | 69 | 80 | 120 |
|
||||
| 5 | 231 | 45 | 167 | 73 | 101 |
|
||||
| 6 | 22 | 17 | 35 | 45 | 88 |
|
||||
|
||||
### 3. Noise (no repeat window of one configuration exists)
|
||||
|
||||
(a) Kernels no switch touches, per-launch p50 difference to CP (us; largest |difference| over the four variants; CP's own p50 in brackets), from all launches of the verify graphs at that T. The first four are device-only kernels (they give the noise of one device kernel); the doorbell and the plan wait depend on the host and are shown for context only:
|
||||
|
||||
| kernel | T=1 | T=2 | T=3 | T=4 | T=5 |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| `chain_gr_split` | 0.00 (3.07) | 0.03 (3.17) | 0.00 (3.04) | 0.00 (3.07) | 0.00 (3.10) |
|
||||
| `chain_gr_down_t2w8_nb4` | 0.06 (8.03) | 0.03 (9.86) | 0.00 (10.53) | 0.03 (11.17) | 0.00 (12.70) |
|
||||
| `chain_gr_up8` | 0.10 (6.43) | 0.10 (7.36) | 0.13 (8.00) | 0.13 (8.80) | 0.16 (9.82) |
|
||||
| `quantize_q8_1` | 0.00 (1.12) | 0.00 (1.15) | 0.00 (1.12) | 0.00 (1.12) | 0.00 (1.15) |
|
||||
| `chain_doorbell_publish` (host-dependent) | 0.09 (2.59) | 0.03 (2.75) | 0.06 (2.88) | 4.09 (7.33) | 1.50 (5.06) |
|
||||
| `chain_wait_copy_i32` (host-dependent) | 0.06 (2.43) | 0.10 (2.82) | 0.48 (3.14) | 0.42 (4.48) | 0.26 (5.79) |
|
||||
|
||||
(a2) The untouched kernels of the F-class chain (DB, EQ, WA, V_GU, WB), sum of the p50 differences to CP (us per layer); the noise used for the F-class verdicts is the largest of these and of the in-window drift (d):
|
||||
|
||||
| window | T=1 | T=2 | T=3 | T=4 | T=5 |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WD | +0.13 | -0.07 | +0.03 | +0.61 | +0.03 |
|
||||
| WH | +0.06 | -0.10 | -0.38 | +0.35 | +0.00 |
|
||||
| WW | +0.06 | +0.03 | +0.22 | +0.64 | +0.90 |
|
||||
| WZ | +0.00 | -0.45 | -0.77 | +0.45 | -0.22 |
|
||||
| **noise used: max of the rows above and of (d)** | 0.16 | 0.45 | 0.83 | 1.41 | 2.43 |
|
||||
| noise of one device kernel (a) | 0.10 | 0.10 | 0.13 | 0.13 | 0.16 |
|
||||
|
||||
(d) Drift inside one session: F-class phase p50 of the first half of the graphs minus the second half (us per layer; every window, same T; windows with at least 40 graphs and 100 F layers per half enter the noise):
|
||||
|
||||
| window | T=1 | T=2 | T=3 | T=4 | T=5 |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| CP | -0.06 | -0.16 | -0.83 | -0.10 | +0.10 |
|
||||
| WD | +0.16 | -0.45 | -0.83 | -0.83 | +2.43 |
|
||||
| WH | +0.10 | -0.26 | -0.64 | +0.70 | +0.19 |
|
||||
| WW | +0.00 | -0.16 | +0.03 | +0.03 | -0.96 |
|
||||
| WZ | -0.13 | -0.10 | -0.51 | -1.41 | +0.09 |
|
||||
|
||||
### 4. Per-launch kernels of the three switches
|
||||
|
||||
#### D1 DOWN_SUB16: routed experts' gate/up and down, VRAM pass (V) and PCIe pass (P)
|
||||
|
||||
All layers, p50 us (launches per graph):
|
||||
|
||||
T=1 (graphs 28 / 56 / 34 / 44 / 33)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_GU | 12.58 (48.0) | 12.67 (48.0) | 12.64 (48.0) | 12.67 (48.0) | 12.57 (48.0) |
|
||||
| V_DN | 10.43 (48.0) | 8.10 (48.0) | 10.46 (48.0) | 10.50 (48.0) | 8.03 (48.0) |
|
||||
| P_GU | 0.74 (48.0) | 0.70 (48.0) | 0.74 (48.0) | 0.74 (48.0) | 0.70 (48.0) |
|
||||
| P_DN | 1.92 (48.0) | 0.67 (48.0) | 1.92 (48.0) | 1.92 (48.0) | 0.67 (48.0) |
|
||||
|
||||
T=2 (graphs 206 / 281 / 320 / 275 / 162)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_GU | 16.00 (48.0) | 16.06 (48.0) | 16.00 (48.0) | 16.16 (48.0) | 15.71 (48.0) |
|
||||
| V_DN | 14.78 (48.0) | 11.33 (48.0) | 14.82 (48.0) | 14.91 (48.0) | 11.04 (48.0) |
|
||||
| P_GU | 1.47 (48.0) | 1.18 (48.0) | 1.50 (48.0) | 1.47 (48.0) | 1.18 (48.0) |
|
||||
| P_DN | 3.46 (48.0) | 0.67 (48.0) | 3.46 (48.0) | 3.46 (48.0) | 0.67 (48.0) |
|
||||
|
||||
T=3 (graphs 253 / 40 / 175 / 285 / 208)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_GU | 22.56 (48.0) | 22.05 (47.9) | 22.21 (48.0) | 22.85 (48.0) | 22.02 (48.0) |
|
||||
| V_DN | 19.14 (48.0) | 13.73 (47.9) | 19.14 (48.0) | 19.39 (48.0) | 13.76 (48.0) |
|
||||
| P_GU | 1.12 (48.0) | 1.22 (47.9) | 1.12 (48.0) | 1.09 (48.0) | 1.18 (48.0) |
|
||||
| P_DN | 5.50 (48.0) | 0.70 (47.9) | 5.50 (48.0) | 5.50 (48.0) | 0.67 (48.0) |
|
||||
|
||||
T=4 (graphs 40 / 354 / 69 / 80 / 120)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_GU | 24.48 (47.9) | 25.38 (48.0) | 24.77 (48.0) | 25.02 (48.0) | 25.02 (48.0) |
|
||||
| V_DN | 23.14 (47.9) | 16.54 (48.0) | 23.43 (48.0) | 23.68 (48.0) | 16.22 (48.0) |
|
||||
| P_GU | 1.73 (47.9) | 1.22 (48.0) | 1.28 (48.0) | 1.28 (48.0) | 1.22 (48.0) |
|
||||
| P_DN | 7.01 (47.9) | 0.67 (48.0) | 7.01 (48.0) | 7.01 (48.0) | 0.67 (48.0) |
|
||||
|
||||
T=5 (graphs 231 / 45 / 167 / 73 / 101)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_GU | 28.32 (48.0) | 28.10 (47.9) | 28.35 (48.0) | 28.42 (48.0) | 28.32 (48.0) |
|
||||
| V_DN | 28.29 (48.0) | 18.34 (47.9) | 28.29 (48.0) | 28.54 (48.0) | 18.53 (48.0) |
|
||||
| P_GU | 1.44 (48.0) | 1.22 (47.9) | 1.41 (48.0) | 1.38 (48.0) | 1.22 (48.0) |
|
||||
| P_DN | 7.94 (48.0) | 0.77 (47.9) | 7.94 (48.0) | 7.94 (48.0) | 0.74 (48.0) |
|
||||
|
||||
F-class layers only:
|
||||
|
||||
T=1 (graphs 28 / 56 / 34 / 44 / 33)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_DN [F] | 10.62 (32.3) | 8.22 (35.4) | 10.62 (34.1) | 10.59 (36.6) | 8.26 (31.7) |
|
||||
| P_DN [F] | 1.92 (32.3) | 0.64 (35.4) | 1.92 (34.1) | 1.92 (36.6) | 0.67 (31.7) |
|
||||
| P_GU [F] | 0.74 (32.3) | 0.70 (35.4) | 0.74 (34.1) | 0.74 (36.6) | 0.70 (31.7) |
|
||||
|
||||
T=2 (graphs 206 / 281 / 320 / 275 / 162)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_DN [F] | 15.11 (26.8) | 11.52 (30.1) | 15.07 (27.5) | 15.07 (30.6) | 11.33 (25.3) |
|
||||
| P_DN [F] | 3.42 (26.8) | 0.67 (30.1) | 3.42 (27.5) | 3.42 (30.6) | 0.67 (25.3) |
|
||||
| P_GU [F] | 1.47 (26.8) | 1.18 (30.1) | 1.47 (27.5) | 1.47 (30.6) | 1.18 (25.3) |
|
||||
|
||||
T=3 (graphs 253 / 40 / 175 / 285 / 208)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_DN [F] | 19.33 (22.3) | 14.05 (19.3) | 19.30 (20.6) | 19.52 (25.0) | 13.73 (23.4) |
|
||||
| P_DN [F] | 5.50 (22.3) | 0.64 (19.3) | 5.50 (20.6) | 5.50 (25.0) | 0.64 (23.4) |
|
||||
| P_GU [F] | 1.09 (22.3) | 1.18 (19.3) | 1.09 (20.6) | 1.09 (25.0) | 1.18 (23.4) |
|
||||
|
||||
T=4 (graphs 40 / 354 / 69 / 80 / 120)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_DN [F] | 23.84 (11.4) | 16.57 (19.8) | 23.90 (16.1) | 24.03 (16.2) | 16.32 (18.4) |
|
||||
| P_DN [F] | 7.01 (11.4) | 0.64 (19.8) | 7.01 (16.1) | 7.01 (16.2) | 0.64 (18.4) |
|
||||
| P_GU [F] | 1.22 (11.4) | 1.18 (19.8) | 1.22 (16.1) | 1.22 (16.2) | 1.18 (18.4) |
|
||||
|
||||
T=5 (graphs 231 / 45 / 167 / 73 / 101)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| V_DN [F] | 28.42 (12.3) | 18.11 (14.9) | 28.32 (12.1) | 28.86 (13.5) | 18.02 (14.6) |
|
||||
| P_DN [F] | 7.90 (12.3) | 0.67 (14.9) | 7.90 (12.1) | 7.90 (13.5) | 0.64 (14.6) |
|
||||
| P_GU [F] | 1.31 (12.3) | 0.74 (14.9) | 1.34 (12.1) | 1.34 (13.5) | 0.74 (14.6) |
|
||||
|
||||
Grid (x by y blocks) of the launches, most common first (VRAM pass, PCIe pass, PCIe gate/up):
|
||||
|
||||
| launch | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 V_DN | 320x10 | 80x10 + 160x10 | 320x10 | 320x10 | 80x10 + 160x10 |
|
||||
| T=1 P_DN | 320x10 | 80x4 + 160x4 | 320x10 | 320x10 | 80x4 + 160x4 |
|
||||
| T=1 P_GU | 20x10 | 20x4 | 20x10 | 20x10 | 20x4 |
|
||||
| T=2 V_DN | 320x20 | 80x20 + 160x20 | 320x20 | 320x20 | 80x20 + 160x20 |
|
||||
| T=2 P_DN | 320x20 | 80x4 + 160x4 | 320x20 | 320x20 | 80x4 + 160x4 |
|
||||
| T=2 P_GU | 20x20 | 20x4 | 20x20 | 20x20 | 20x4 |
|
||||
| T=3 V_DN | 320x30 | 80x30 + 160x30 | 320x30 | 320x30 | 80x30 + 160x30 |
|
||||
| T=3 P_DN | 320x30 | 80x4 + 160x4 | 320x30 | 320x30 | 80x4 + 160x4 |
|
||||
| T=3 P_GU | 20x30 | 20x4 | 20x30 | 20x30 | 20x4 |
|
||||
| T=4 V_DN | 320x40 | 80x40 + 160x40 | 320x40 | 320x40 | 80x40 + 160x40 |
|
||||
| T=4 P_DN | 320x40 | 80x4 + 160x4 | 320x40 | 320x40 | 80x4 + 160x4 |
|
||||
| T=4 P_GU | 20x40 | 20x4 | 20x40 | 20x40 | 20x4 |
|
||||
| T=5 V_DN | 320x50 | 80x50 + 160x50 | 320x50 | 320x50 | 80x50 + 160x50 |
|
||||
| T=5 P_DN | 320x50 | 80x4 + 160x4 | 320x50 | 320x50 | 80x4 + 160x4 |
|
||||
| T=5 P_GU | 20x50 | 20x4 | 20x50 | 20x50 | 20x4 |
|
||||
|
||||
#### D2 HITS_IN_COMBINE and D3 WAIT_M_ROWS
|
||||
|
||||
All layers, p50 us (launches per graph):
|
||||
|
||||
T=1 (graphs 28 / 56 / 34 / 44 / 33)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM | 1.73 (48.0) | 1.38 (48.0) | 1.50 (48.0) | - | - |
|
||||
| CR | 1.31 (48.0) | 1.31 (48.0) | 1.31 (48.0) | - | - |
|
||||
| WC | - | - | - | 6.18 (48.0) | 6.11 (48.0) |
|
||||
| AH | 1.22 (48.0) | 1.22 (48.0) | - | 1.22 (48.0) | - |
|
||||
| CB | 1.47 (48.0) | 1.44 (48.0) | 1.92 (48.0) | 1.47 (48.0) | 1.92 (48.0) |
|
||||
|
||||
T=2 (graphs 206 / 281 / 320 / 275 / 162)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM | 2.30 (48.0) | 1.57 (48.0) | 2.27 (48.0) | - | - |
|
||||
| CR | 1.34 (48.0) | 1.79 (48.0) | 1.34 (48.0) | - | - |
|
||||
| WC | - | - | - | 10.94 (48.0) | 10.88 (48.0) |
|
||||
| AH | 1.22 (48.0) | 1.22 (48.0) | - | 1.22 (48.0) | - |
|
||||
| CB | 1.50 (48.0) | 1.50 (48.0) | 1.98 (48.0) | 1.50 (48.0) | 2.02 (48.0) |
|
||||
|
||||
T=3 (graphs 253 / 40 / 175 / 285 / 208)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM | 22.43 (48.0) | 47.20 (47.9) | 29.06 (48.0) | - | - |
|
||||
| CR | 2.02 (48.0) | 2.75 (47.9) | 2.66 (48.0) | - | - |
|
||||
| WC | - | - | - | 15.46 (48.0) | 39.42 (48.0) |
|
||||
| AH | 1.31 (48.0) | 1.31 (47.9) | - | 1.31 (48.0) | - |
|
||||
| CB | 1.50 (48.0) | 1.50 (47.9) | 1.98 (48.0) | 1.50 (48.0) | 2.02 (48.0) |
|
||||
|
||||
T=4 (graphs 40 / 354 / 69 / 80 / 120)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM | 59.52 (47.9) | 39.55 (48.0) | 39.71 (48.0) | - | - |
|
||||
| CR | 3.14 (47.9) | 2.69 (48.0) | 2.91 (48.0) | - | - |
|
||||
| WC | - | - | - | 53.28 (48.0) | 62.37 (48.0) |
|
||||
| AH | 1.31 (47.9) | 1.31 (48.0) | - | 1.31 (48.0) | - |
|
||||
| CB | 1.50 (47.9) | 1.50 (48.0) | 1.99 (48.0) | 1.50 (48.0) | 2.02 (48.0) |
|
||||
|
||||
T=5 (graphs 231 / 45 / 167 / 73 / 101)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM | 59.94 (48.0) | 62.08 (47.9) | 63.87 (48.0) | - | - |
|
||||
| CR | 3.10 (48.0) | 3.04 (47.9) | 3.10 (48.0) | - | - |
|
||||
| WC | - | - | - | 76.58 (48.0) | 78.62 (48.0) |
|
||||
| AH | 1.34 (48.0) | 1.34 (47.9) | - | 1.34 (48.0) | - |
|
||||
| CB | 1.54 (48.0) | 1.54 (47.9) | 2.05 (48.0) | 1.54 (48.0) | 2.05 (48.0) |
|
||||
|
||||
F-class layers only:
|
||||
|
||||
T=1 (graphs 28 / 56 / 34 / 44 / 33)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM [F] | 1.38 (32.3) | 1.31 (35.4) | 1.38 (34.1) | - | - |
|
||||
| CR [F] | 1.28 (32.3) | 1.28 (35.4) | 1.28 (34.1) | - | - |
|
||||
| WC [F] | - | - | - | 6.08 (36.6) | 6.02 (31.7) |
|
||||
| AH [F] | 1.22 (32.3) | 1.22 (35.4) | - | 1.22 (36.6) | - |
|
||||
| CB [F] | 1.47 (32.3) | 1.47 (35.4) | 1.92 (34.1) | 1.47 (36.6) | 1.95 (31.7) |
|
||||
|
||||
T=2 (graphs 206 / 281 / 320 / 275 / 162)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM [F] | 2.11 (26.8) | 1.34 (30.1) | 2.11 (27.5) | - | - |
|
||||
| CR [F] | 1.31 (26.8) | 1.31 (30.1) | 1.31 (27.5) | - | - |
|
||||
| WC [F] | - | - | - | 10.66 (30.6) | 10.34 (25.3) |
|
||||
| AH [F] | 1.22 (26.8) | 1.22 (30.1) | - | 1.22 (30.6) | - |
|
||||
| CB [F] | 1.50 (26.8) | 1.50 (30.1) | 1.98 (27.5) | 1.50 (30.6) | 2.02 (25.3) |
|
||||
|
||||
T=3 (graphs 253 / 40 / 175 / 285 / 208)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM [F] | 1.38 (22.3) | 1.31 (19.3) | 1.38 (20.6) | - | - |
|
||||
| CR [F] | 1.31 (22.3) | 1.31 (19.3) | 1.31 (20.6) | - | - |
|
||||
| WC [F] | - | - | - | 14.75 (25.0) | 14.62 (23.4) |
|
||||
| AH [F] | 1.31 (22.3) | 1.31 (19.3) | - | 1.31 (25.0) | - |
|
||||
| CB [F] | 1.50 (22.3) | 1.50 (19.3) | 2.02 (20.6) | 1.50 (25.0) | 2.02 (23.4) |
|
||||
|
||||
T=4 (graphs 40 / 354 / 69 / 80 / 120)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM [F] | 1.38 (11.4) | 1.31 (19.8) | 1.38 (16.1) | - | - |
|
||||
| CR [F] | 1.31 (11.4) | 1.31 (19.8) | 1.31 (16.1) | - | - |
|
||||
| WC [F] | - | - | - | 19.04 (16.2) | 18.94 (18.4) |
|
||||
| AH [F] | 1.31 (11.4) | 1.31 (19.8) | - | 1.31 (16.2) | - |
|
||||
| CB [F] | 1.50 (11.4) | 1.50 (19.8) | 2.02 (16.1) | 1.50 (16.2) | 2.02 (18.4) |
|
||||
|
||||
T=5 (graphs 231 / 45 / 167 / 73 / 101)
|
||||
|
||||
| role: p50 us (launches per graph) | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| WM [F] | 2.14 (12.3) | 1.31 (14.9) | 2.14 (12.1) | - | - |
|
||||
| CR [F] | 1.34 (12.3) | 1.34 (14.9) | 1.34 (12.1) | - | - |
|
||||
| WC [F] | - | - | - | 23.68 (13.5) | 23.27 (14.6) |
|
||||
| AH [F] | 1.34 (12.3) | 1.34 (14.9) | - | 1.34 (13.5) | - |
|
||||
| CB [F] | 1.54 (12.3) | 1.54 (14.9) | 2.05 (12.1) | 1.54 (13.5) | 2.05 (14.6) |
|
||||
|
||||
D3 kernel floor: wait+copy region of F-class layers (CP/WD/WH: wait M start to copy end; WW/WZ: the `leleka_verify_wait_copy_rows` duration), p50 us, against the blocks of the copy (T x 10):
|
||||
|
||||
| T | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 (10 blocks) | 2.78 | 2.72 | 2.75 | 6.08 | 6.02 |
|
||||
| T=2 (20 blocks) | 3.52 | 2.94 | 3.52 | 10.66 | 10.34 |
|
||||
| T=3 (30 blocks) | 2.82 | 2.75 | 2.78 | 14.75 | 14.62 |
|
||||
| T=4 (40 blocks) | 2.78 | 2.72 | 2.78 | 19.04 | 18.94 |
|
||||
| T=5 (50 blocks) | 3.58 | 2.72 | 3.58 | 23.68 | 23.27 |
|
||||
|
||||
Least-squares line through the 5th percentile of the D3 kernel (WW and WZ, T 1..8, 15 points): 1.44 us + 0.433 us per block. The CP pair (wait M + copy) stays at 2.72 us from T=1 to T=6.
|
||||
|
||||
### 4d. D1 in the layers with a PCIe leg (class X): gate/up and down of both passes, p50 / mean us
|
||||
|
||||
| launch | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 V_DN [X] | 7.97 / 7.52 | 5.70 / 5.53 | 7.78 / 7.27 | 8.00 / 7.58 | 5.73 / 5.69 |
|
||||
| T=1 P_GU [X] | 6.34 / 6.32 | 5.98 / 5.93 | 6.34 / 6.24 | 6.37 / 6.19 | 5.95 / 5.97 |
|
||||
| T=1 P_DN [X] | 2.30 / 2.34 | 2.66 / 2.58 | 2.30 / 2.39 | 2.30 / 2.36 | 2.59 / 2.53 |
|
||||
| T=2 V_DN [X] | 12.54 / 12.42 | 10.14 / 9.62 | 13.09 / 12.83 | 13.86 / 13.43 | 10.02 / 9.53 |
|
||||
| T=2 P_GU [X] | 6.78 / 6.68 | 6.72 / 6.79 | 6.78 / 6.70 | 6.78 / 6.64 | 6.69 / 6.86 |
|
||||
| T=2 P_DN [X] | 3.52 / 4.13 | 2.62 / 2.71 | 3.49 / 4.04 | 3.49 / 3.76 | 2.66 / 2.76 |
|
||||
| T=3 V_DN [X] | 18.27 / 17.97 | 11.49 / 11.72 | 18.27 / 17.91 | 18.78 / 18.48 | 13.25 / 12.98 |
|
||||
| T=3 P_GU [X] | 6.85 / 6.82 | 6.91 / 8.01 | 6.85 / 6.85 | 6.82 / 6.74 | 6.78 / 7.18 |
|
||||
| T=3 P_DN [X] | 4.99 / 5.64 | 2.75 / 3.28 | 4.99 / 5.68 | 4.96 / 5.41 | 2.62 / 2.81 |
|
||||
| T=4 V_DN [X] | 21.50 / 21.18 | 16.10 / 15.79 | 21.50 / 21.37 | 22.98 / 22.70 | 15.62 / 15.38 |
|
||||
| T=4 P_GU [X] | 7.10 / 7.36 | 6.91 / 7.44 | 7.04 / 7.30 | 6.94 / 6.90 | 6.91 / 7.78 |
|
||||
| T=4 P_DN [X] | 7.36 / 7.98 | 2.69 / 2.99 | 7.36 / 7.94 | 6.50 / 7.14 | 2.72 / 3.20 |
|
||||
| T=5 V_DN [X] | 27.97 / 27.50 | 18.40 / 18.20 | 28.00 / 27.58 | 28.42 / 28.01 | 18.79 / 18.60 |
|
||||
| T=5 P_GU [X] | 7.07 / 7.14 | 7.04 / 8.01 | 7.07 / 7.13 | 7.07 / 7.07 | 6.98 / 7.51 |
|
||||
| T=5 P_DN [X] | 8.74 / 8.87 | 2.78 / 3.29 | 8.74 / 8.87 | 8.67 / 8.78 | 2.72 / 3.03 |
|
||||
|
||||
### 4b. Kernel-level deltas in the F-class chain, window minus CP (p50 us per layer)
|
||||
|
||||
Columns: the VRAM-pass down, the PCIe-pass down, the PCIe-pass gate/up (D1); the wait+copy region (D3: wait M start to copy end, or the one kernel); `add_hits` plus combine from the end of the copy region to the end of the combine (D2: the tail); the routed span V_GU start to P_DN end. Noise of one device kernel from section 3 (a) in the last column.
|
||||
|
||||
| window | d V_DN | d P_DN | d P_GU | d wait+copy | d tail | d routed span | noise (kernel) |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 WD | -2.40 | -1.28 | -0.03 | -0.06 | +0.00 | -3.74 | 0.10 |
|
||||
| T=1 WH | +0.00 | +0.00 | +0.00 | -0.03 | -0.86 | +0.06 | 0.10 |
|
||||
| T=1 WW | -0.03 | +0.00 | +0.00 | +3.30 | +0.03 | +0.06 | 0.10 |
|
||||
| T=1 WZ | -2.37 | -1.25 | -0.03 | +3.23 | -0.86 | -3.84 | 0.10 |
|
||||
| T=2 WD | -3.59 | -2.75 | -0.29 | -0.58 | -0.03 | -7.36 | 0.10 |
|
||||
| T=2 WH | -0.03 | +0.00 | +0.00 | +0.00 | -0.86 | -0.16 | 0.10 |
|
||||
| T=2 WW | -0.03 | +0.00 | +0.00 | +7.14 | -0.03 | +0.00 | 0.10 |
|
||||
| T=2 WZ | -3.78 | -2.75 | -0.29 | +6.82 | -0.83 | -7.84 | 0.10 |
|
||||
| T=3 WD | -5.28 | -4.86 | +0.10 | -0.06 | -0.00 | -10.18 | 0.13 |
|
||||
| T=3 WH | -0.03 | +0.00 | +0.00 | -0.03 | -0.90 | -0.35 | 0.13 |
|
||||
| T=3 WW | +0.19 | +0.00 | +0.00 | +11.94 | +0.03 | +0.29 | 0.13 |
|
||||
| T=3 WZ | -5.60 | -4.86 | +0.10 | +11.81 | -0.90 | -11.17 | 0.13 |
|
||||
| T=4 WD | -7.27 | -6.37 | -0.03 | -0.06 | +0.03 | -12.54 | 0.13 |
|
||||
| T=4 WH | +0.06 | +0.00 | +0.00 | +0.00 | -0.90 | +0.86 | 0.13 |
|
||||
| T=4 WW | +0.19 | +0.00 | +0.00 | +16.26 | +0.03 | +1.06 | 0.13 |
|
||||
| T=4 WZ | -7.52 | -6.37 | -0.03 | +16.16 | -0.90 | -13.15 | 0.13 |
|
||||
| T=5 WD | -10.30 | -7.23 | -0.58 | -0.86 | +0.00 | -18.05 | 0.16 |
|
||||
| T=5 WH | -0.10 | +0.00 | +0.03 | +0.00 | -0.93 | -0.48 | 0.16 |
|
||||
| T=5 WW | +0.45 | +0.00 | +0.03 | +20.10 | +0.00 | +1.02 | 0.16 |
|
||||
| T=5 WZ | -10.40 | -7.26 | -0.58 | +19.68 | -0.93 | -18.24 | 0.16 |
|
||||
|
||||
### 4c. The tail after the copy of the CPU rows (copy or D3 kernel end to combine end), all classes
|
||||
|
||||
This part of a layer is after the last wait, so it is on the critical path in every layer, waiting or not, and does not depend on the expert tier. p50 us per layer; the last columns are the mean delta x 48 layers in ms per graph and its verdict against the single-kernel noise.
|
||||
|
||||
| T class | CP p50 | WD d p50 (per graph) | WH d p50 (per graph) | WW d p50 (per graph) | WZ d p50 (per graph) |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 F | 2.88 | +0.00 (-0.000 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) | +0.03 (+0.001 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) |
|
||||
| T=1 C | 2.85 | +0.00 (+0.000 ms, unresolved) | -0.83 (-0.041 ms, resolved gain) | +0.06 (+0.003 ms, unresolved) | -0.83 (-0.041 ms, resolved gain) |
|
||||
| T=1 X | 2.91 | -0.06 (-0.001 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) | +0.00 (-0.002 ms, unresolved) | -0.90 (-0.041 ms, resolved gain) |
|
||||
| T=1 all | 2.88 | +0.00 (-0.000 ms, unresolved) | -0.86 (-0.041 ms, resolved gain) | +0.03 (+0.001 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) |
|
||||
| T=2 F | 2.94 | -0.03 (-0.001 ms, unresolved) | -0.86 (-0.039 ms, resolved gain) | -0.03 (+0.000 ms, unresolved) | -0.83 (-0.038 ms, resolved gain) |
|
||||
| T=2 C | 2.94 | +0.00 (+0.000 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) | -0.03 (+0.001 ms, unresolved) | -0.86 (-0.039 ms, resolved gain) |
|
||||
| T=2 X | 2.94 | +0.00 (-0.000 ms, unresolved) | -0.86 (-0.041 ms, resolved gain) | -0.03 (-0.001 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) |
|
||||
| T=2 all | 2.94 | +0.00 (-0.000 ms, unresolved) | -0.86 (-0.040 ms, resolved gain) | -0.03 (+0.001 ms, unresolved) | -0.83 (-0.038 ms, resolved gain) |
|
||||
| T=3 F | 3.01 | -0.00 (-0.001 ms, unresolved) | -0.90 (-0.044 ms, resolved gain) | +0.03 (+0.000 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) |
|
||||
| T=3 C | 3.01 | +0.00 (-0.000 ms, unresolved) | -0.93 (-0.044 ms, resolved gain) | +0.00 (+0.001 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) |
|
||||
| T=3 X | 3.01 | -0.00 (-0.001 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) | +0.00 (-0.000 ms, unresolved) | -0.93 (-0.044 ms, resolved gain) |
|
||||
| T=3 all | 3.01 | +0.00 (-0.001 ms, unresolved) | -0.93 (-0.044 ms, resolved gain) | +0.00 (+0.001 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) |
|
||||
| T=4 F | 3.01 | +0.03 (+0.001 ms, unresolved) | -0.90 (-0.045 ms, resolved gain) | +0.03 (-0.000 ms, unresolved) | -0.90 (-0.044 ms, resolved gain) |
|
||||
| T=4 C | 3.01 | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.044 ms, resolved gain) | +0.00 (+0.000 ms, unresolved) | -0.90 (-0.044 ms, resolved gain) |
|
||||
| T=4 X | 3.01 | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.044 ms, resolved gain) | +0.00 (+0.000 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) |
|
||||
| T=4 all | 3.01 | +0.00 (+0.001 ms, unresolved) | -0.90 (-0.044 ms, resolved gain) | +0.00 (+0.001 ms, unresolved) | -0.90 (-0.043 ms, resolved gain) |
|
||||
| T=5 F | 3.07 | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) |
|
||||
| T=5 C | 3.07 | +0.00 (-0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) | +0.00 (-0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) |
|
||||
| T=5 X | 3.07 | -0.00 (-0.000 ms, unresolved) | -0.96 (-0.046 ms, resolved gain) | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) |
|
||||
| T=5 all | 3.07 | +0.00 (+0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) | +0.00 (-0.000 ms, unresolved) | -0.93 (-0.045 ms, resolved gain) |
|
||||
|
||||
F-class chain of one layer: p50 per role (us), the routed span (V_GU start to PCIe-pass down end), the wait-to-end span (wait M or D3 kernel start to combine end), the tail (copy or D3 end to combine end) and the whole FFN phase (doorbell start to combine end). Layers: no PCIe leg, no CPU wait.
|
||||
|
||||
T=1
|
||||
|
||||
| role / span | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| DB | 2.59 | 2.62 | 2.56 | 2.56 | 2.56 |
|
||||
| EQ | 1.12 | 1.12 | 1.12 | 1.12 | 1.12 |
|
||||
| WA | 2.43 | 2.46 | 2.43 | 2.46 | 2.46 |
|
||||
| V_GU | 12.74 | 12.83 | 12.83 | 12.80 | 12.77 |
|
||||
| V_DN | 10.62 | 8.22 | 10.62 | 10.59 | 8.26 |
|
||||
| WB | 2.21 | 2.18 | 2.21 | 2.21 | 2.18 |
|
||||
| P_GU | 0.74 | 0.70 | 0.74 | 0.74 | 0.70 |
|
||||
| P_DN | 1.92 | 0.64 | 1.92 | 1.92 | 0.67 |
|
||||
| WM | 1.38 | 1.31 | 1.38 | - | - |
|
||||
| CR | 1.28 | 1.28 | 1.28 | - | - |
|
||||
| WC | - | - | - | 6.08 | 6.02 |
|
||||
| AH | 1.22 | 1.22 | - | 1.22 | - |
|
||||
| CB | 1.47 | 1.47 | 1.92 | 1.47 | 1.95 |
|
||||
| routed span | 28.86 | 25.12 | 28.93 | 28.93 | 25.02 |
|
||||
| wait-to-end span | 5.70 | 5.63 | 4.80 | 8.96 | 8.03 |
|
||||
| tail after the copy | 2.88 | 2.88 | 2.02 | 2.91 | 2.02 |
|
||||
| **FFN phase (combine end)** | 41.63 | 37.73 | 40.86 | 44.90 | 40.16 |
|
||||
| F layers (graphs) | 904 (28) | 1980 (56) | 1161 (34) | 1612 (44) | 1045 (33) |
|
||||
|
||||
T=2
|
||||
|
||||
| role / span | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| DB | 2.75 | 2.75 | 2.75 | 2.78 | 2.78 |
|
||||
| EQ | 1.15 | 1.15 | 1.15 | 1.15 | 1.15 |
|
||||
| WA | 2.78 | 2.82 | 2.82 | 2.85 | 2.85 |
|
||||
| V_GU | 16.51 | 16.48 | 16.38 | 16.45 | 16.03 |
|
||||
| V_DN | 15.11 | 11.52 | 15.07 | 15.07 | 11.33 |
|
||||
| WB | 2.27 | 2.21 | 2.27 | 2.27 | 2.21 |
|
||||
| P_GU | 1.47 | 1.18 | 1.47 | 1.47 | 1.18 |
|
||||
| P_DN | 3.42 | 0.67 | 3.42 | 3.42 | 0.67 |
|
||||
| WM | 2.11 | 1.34 | 2.11 | - | - |
|
||||
| CR | 1.31 | 1.31 | 1.31 | - | - |
|
||||
| WC | - | - | - | 10.66 | 10.34 |
|
||||
| AH | 1.22 | 1.22 | - | 1.22 | - |
|
||||
| CB | 1.50 | 1.50 | 1.98 | 1.50 | 2.02 |
|
||||
| routed span | 40.03 | 32.67 | 39.87 | 40.03 | 32.19 |
|
||||
| wait-to-end span | 6.37 | 5.98 | 5.60 | 13.60 | 12.51 |
|
||||
| tail after the copy | 2.94 | 2.91 | 2.08 | 2.91 | 2.11 |
|
||||
| **FFN phase (combine end)** | 54.27 | 46.56 | 53.38 | 61.70 | 52.93 |
|
||||
| F layers (graphs) | 5513 (202) | 8450 (279) | 8815 (320) | 8421 (275) | 4102 (161) |
|
||||
|
||||
T=3
|
||||
|
||||
| role / span | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| DB | 2.88 | 2.88 | 2.88 | 2.91 | 2.91 |
|
||||
| EQ | 1.12 | 1.12 | 1.12 | 1.12 | 1.12 |
|
||||
| WA | 3.04 | 3.10 | 3.04 | 3.04 | 3.04 |
|
||||
| V_GU | 23.01 | 23.04 | 22.62 | 23.20 | 22.27 |
|
||||
| V_DN | 19.33 | 14.05 | 19.30 | 19.52 | 13.73 |
|
||||
| WB | 2.27 | 2.21 | 2.27 | 2.27 | 2.21 |
|
||||
| P_GU | 1.09 | 1.18 | 1.09 | 1.09 | 1.18 |
|
||||
| P_DN | 5.50 | 0.64 | 5.50 | 5.50 | 0.64 |
|
||||
| WM | 1.38 | 1.31 | 1.38 | - | - |
|
||||
| CR | 1.31 | 1.31 | 1.31 | - | - |
|
||||
| WC | - | - | - | 14.75 | 14.62 |
|
||||
| AH | 1.31 | 1.31 | - | 1.31 | - |
|
||||
| CB | 1.50 | 1.50 | 2.02 | 1.50 | 2.02 |
|
||||
| routed span | 51.42 | 41.25 | 51.07 | 51.71 | 40.26 |
|
||||
| wait-to-end span | 5.86 | 5.79 | 4.90 | 17.79 | 16.80 |
|
||||
| tail after the copy | 3.01 | 3.01 | 2.11 | 3.04 | 2.11 |
|
||||
| **FFN phase (combine end)** | 65.67 | 55.71 | 64.74 | 78.24 | 65.79 |
|
||||
| F layers (graphs) | 5633 (248) | 772 (34) | 3612 (173) | 7138 (284) | 4867 (206) |
|
||||
|
||||
T=4
|
||||
|
||||
| role / span | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| DB | 3.20 | 3.17 | 3.20 | 3.23 | 3.20 |
|
||||
| EQ | 1.12 | 1.12 | 1.12 | 1.12 | 1.12 |
|
||||
| WA | 3.58 | 3.58 | 3.58 | 3.68 | 3.65 |
|
||||
| V_GU | 24.70 | 25.41 | 25.09 | 25.25 | 25.15 |
|
||||
| V_DN | 23.84 | 16.57 | 23.90 | 24.03 | 16.32 |
|
||||
| WB | 2.30 | 2.24 | 2.27 | 2.27 | 2.24 |
|
||||
| P_GU | 1.22 | 1.18 | 1.22 | 1.22 | 1.18 |
|
||||
| P_DN | 7.01 | 0.64 | 7.01 | 7.01 | 0.64 |
|
||||
| WM | 1.38 | 1.31 | 1.38 | - | - |
|
||||
| CR | 1.31 | 1.31 | 1.31 | - | - |
|
||||
| WC | - | - | - | 19.04 | 18.94 |
|
||||
| AH | 1.31 | 1.31 | - | 1.31 | - |
|
||||
| CB | 1.50 | 1.50 | 2.02 | 1.50 | 2.02 |
|
||||
| routed span | 59.20 | 46.66 | 60.06 | 60.26 | 46.05 |
|
||||
| wait-to-end span | 5.82 | 5.79 | 4.90 | 22.08 | 21.09 |
|
||||
| tail after the copy | 3.01 | 3.04 | 2.11 | 3.04 | 2.11 |
|
||||
| **FFN phase (combine end)** | 75.01 | 62.15 | 74.91 | 92.29 | 77.31 |
|
||||
| F layers (graphs) | 457 (33) | 7020 (342) | 1112 (62) | 1298 (79) | 2203 (113) |
|
||||
|
||||
T=5
|
||||
|
||||
| role / span | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| DB | 3.36 | 3.36 | 3.39 | 3.42 | 3.36 |
|
||||
| EQ | 1.15 | 1.15 | 1.15 | 1.15 | 1.15 |
|
||||
| WA | 4.26 | 4.29 | 4.38 | 4.45 | 4.26 |
|
||||
| V_GU | 28.74 | 28.80 | 28.58 | 29.38 | 28.58 |
|
||||
| V_DN | 28.42 | 18.11 | 28.32 | 28.86 | 18.02 |
|
||||
| WB | 2.27 | 2.21 | 2.27 | 2.27 | 2.21 |
|
||||
| P_GU | 1.31 | 0.74 | 1.34 | 1.34 | 0.74 |
|
||||
| P_DN | 7.90 | 0.67 | 7.90 | 7.90 | 0.64 |
|
||||
| WM | 2.14 | 1.31 | 2.14 | - | - |
|
||||
| CR | 1.34 | 1.34 | 1.34 | - | - |
|
||||
| WC | - | - | - | 23.68 | 23.27 |
|
||||
| AH | 1.34 | 1.34 | - | 1.34 | - |
|
||||
| CB | 1.54 | 1.54 | 2.05 | 1.54 | 2.05 |
|
||||
| routed span | 69.66 | 51.62 | 69.18 | 70.69 | 51.42 |
|
||||
| wait-to-end span | 6.69 | 5.82 | 5.73 | 26.78 | 25.44 |
|
||||
| tail after the copy | 3.07 | 3.07 | 2.14 | 3.07 | 2.14 |
|
||||
| **FFN phase (combine end)** | 87.71 | 69.03 | 86.59 | 109.50 | 88.29 |
|
||||
| F layers (graphs) | 2830 (220) | 670 (39) | 2017 (161) | 986 (71) | 1472 (93) |
|
||||
|
||||
F-class FFN phase p50 by layer kind (us; 36 GDN layers and 12 QSA layers per graph):
|
||||
|
||||
| T kind | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 gdn | 41.57 | 37.73 | 40.80 | 44.83 | 40.10 |
|
||||
| T=1 qsa | 41.76 | 37.73 | 41.19 | 45.09 | 40.32 |
|
||||
| T=2 gdn | 54.08 | 46.34 | 53.09 | 61.31 | 52.51 |
|
||||
| T=2 qsa | 55.01 | 47.30 | 54.46 | 63.14 | 54.30 |
|
||||
| T=3 gdn | 65.41 | 55.65 | 64.29 | 77.63 | 65.63 |
|
||||
| T=3 qsa | 66.37 | 56.32 | 66.56 | 80.42 | 66.37 |
|
||||
| T=4 gdn | 74.21 | 61.73 | 74.43 | 91.52 | 76.77 |
|
||||
| T=4 qsa | 77.66 | 63.39 | 76.06 | 94.69 | 79.11 |
|
||||
| T=5 gdn | 87.26 | 68.70 | 85.95 | 108.74 | 87.62 |
|
||||
| T=5 qsa | 88.80 | 69.73 | 87.75 | 110.98 | 90.27 |
|
||||
|
||||
### 5. FFN phase of the F-class layers (doorbell start to combine end), per T
|
||||
|
||||
p50 over layers; mean and standard error (se) over graphs of the per-graph mean of the F layers of that graph. Delta = window minus CP (negative = faster). Noise = the untouched-chain offset of section 3. Per graph = mean delta x CP's F layers per graph at this T.
|
||||
|
||||
| window | F layers | graphs | p50 us | mean us | se | d p50 | d mean | se of d | noise | ms per graph | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 CP | 904 | 28 | 41.63 | 43.00 | 0.74 | | | | | | |
|
||||
| T=1 WD | 1980 | 56 | 37.73 | 38.77 | 0.35 | -3.90 | -4.23 | 0.82 | 0.16 | -0.137 | resolved gain |
|
||||
| T=1 WH | 1161 | 34 | 40.86 | 41.21 | 0.10 | -0.77 | -1.79 | 0.74 | 0.16 | -0.058 | resolved gain |
|
||||
| T=1 WW | 1612 | 44 | 44.90 | 46.65 | 0.90 | +3.26 | +3.65 | 1.17 | 0.16 | +0.118 | resolved LOSS |
|
||||
| T=1 WZ | 1045 | 33 | 40.16 | 41.31 | 0.29 | -1.47 | -1.69 | 0.79 | 0.16 | -0.055 | resolved gain |
|
||||
| T=2 CP | 5513 | 202 | 54.27 | 55.88 | 0.42 | | | | | | |
|
||||
| T=2 WD | 8450 | 279 | 46.56 | 47.71 | 0.19 | -7.71 | -8.17 | 0.46 | 0.45 | -0.219 | resolved gain |
|
||||
| T=2 WH | 8815 | 320 | 53.38 | 54.30 | 0.21 | -0.90 | -1.58 | 0.47 | 0.45 | -0.042 | resolved gain |
|
||||
| T=2 WW | 8421 | 275 | 61.70 | 62.42 | 0.16 | +7.42 | +6.54 | 0.45 | 0.45 | +0.175 | resolved LOSS |
|
||||
| T=2 WZ | 4102 | 161 | 52.93 | 54.03 | 0.22 | -1.34 | -1.85 | 0.47 | 0.45 | -0.049 | resolved gain |
|
||||
| T=3 CP | 5633 | 248 | 65.67 | 66.27 | 0.20 | | | | | | |
|
||||
| T=3 WD | 772 | 34 | 55.71 | 55.78 | 0.43 | -9.95 | -10.49 | 0.48 | 0.83 | -0.234 | resolved gain |
|
||||
| T=3 WH | 3612 | 173 | 64.74 | 65.24 | 0.18 | -0.93 | -1.02 | 0.27 | 0.83 | -0.023 | resolved gain |
|
||||
| T=3 WW | 7138 | 284 | 78.24 | 78.64 | 0.15 | +12.58 | +12.38 | 0.25 | 0.83 | +0.276 | resolved LOSS |
|
||||
| T=3 WZ | 4867 | 206 | 65.79 | 65.94 | 0.20 | +0.13 | -0.33 | 0.29 | 0.83 | -0.007 | unresolved |
|
||||
| T=4 CP | 457 | 33 | 75.01 | 76.86 | 0.77 | | | | | | |
|
||||
| T=4 WD | 7020 | 342 | 62.15 | 63.15 | 0.21 | -12.86 | -13.71 | 0.80 | 1.41 | -0.157 | resolved gain |
|
||||
| T=4 WH | 1112 | 62 | 74.91 | 75.61 | 0.36 | -0.10 | -1.24 | 0.85 | 1.41 | -0.014 | unresolved |
|
||||
| T=4 WW | 1298 | 79 | 92.29 | 93.54 | 0.41 | +17.28 | +16.69 | 0.88 | 1.41 | +0.191 | resolved LOSS |
|
||||
| T=4 WZ | 2203 | 113 | 77.31 | 77.80 | 0.40 | +2.30 | +0.95 | 0.87 | 1.41 | +0.011 | unresolved |
|
||||
| T=5 CP | 2830 | 220 | 87.71 | 92.49 | 0.53 | | | | | | |
|
||||
| T=5 WD | 670 | 39 | 69.03 | 75.51 | 1.47 | -18.69 | -16.98 | 1.56 | 2.43 | -0.208 | resolved gain |
|
||||
| T=5 WH | 2017 | 161 | 86.59 | 91.39 | 0.45 | -1.12 | -1.09 | 0.70 | 2.43 | -0.013 | unresolved |
|
||||
| T=5 WW | 986 | 71 | 109.50 | 114.97 | 0.80 | +21.79 | +22.48 | 0.96 | 2.43 | +0.275 | resolved LOSS |
|
||||
| T=5 WZ | 1472 | 93 | 88.29 | 94.31 | 0.61 | +0.58 | +1.82 | 0.81 | 2.43 | +0.022 | unresolved |
|
||||
|
||||
### 6. Per switch: F-class section delta, per T and weighted by CP's T mix
|
||||
|
||||
**D1 DOWN_SUB16 (WD minus CP)**
|
||||
|
||||
| T | F layers per graph | d p50 us | d mean us | se | noise us | ms per graph | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | 32.3 | -3.90 | -4.23 | 0.82 | 0.16 | -0.137 | resolved gain |
|
||||
| T=2 | 26.8 | -7.71 | -8.17 | 0.46 | 0.45 | -0.219 | resolved gain |
|
||||
| T=3 | 22.3 | -9.95 | -10.49 | 0.48 | 0.83 | -0.234 | resolved gain |
|
||||
| T=4 | 11.4 | -12.86 | -13.71 | 0.80 | 1.41 | -0.157 | resolved gain |
|
||||
| T=5 | 12.3 | -18.69 | -16.98 | 1.56 | 2.43 | -0.208 | resolved gain |
|
||||
| **CP mix** | | -11.94 | -11.78 | | | -0.214 (se 0.008, noise 0.020) | |
|
||||
|
||||
**D2 HITS_IN_COMBINE (WH minus CP)**
|
||||
|
||||
| T | F layers per graph | d p50 us | d mean us | se | noise us | ms per graph | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | 32.3 | -0.77 | -1.79 | 0.74 | 0.16 | -0.058 | resolved gain |
|
||||
| T=2 | 26.8 | -0.90 | -1.58 | 0.47 | 0.45 | -0.042 | resolved gain |
|
||||
| T=3 | 22.3 | -0.93 | -1.02 | 0.27 | 0.83 | -0.023 | resolved gain |
|
||||
| T=4 | 11.4 | -0.10 | -1.24 | 0.85 | 1.41 | -0.014 | unresolved |
|
||||
| T=5 | 12.3 | -1.12 | -1.09 | 0.70 | 2.43 | -0.013 | unresolved |
|
||||
| **CP mix** | | -0.93 | -1.24 | | | -0.026 (se 0.005, noise 0.020) | |
|
||||
|
||||
**D3 WAIT_M_ROWS (WW minus CP)**
|
||||
|
||||
| T | F layers per graph | d p50 us | d mean us | se | noise us | ms per graph | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | 32.3 | +3.26 | +3.65 | 1.17 | 0.16 | +0.118 | resolved LOSS |
|
||||
| T=2 | 26.8 | +7.42 | +6.54 | 0.45 | 0.45 | +0.175 | resolved LOSS |
|
||||
| T=3 | 22.3 | +12.58 | +12.38 | 0.25 | 0.83 | +0.276 | resolved LOSS |
|
||||
| T=4 | 11.4 | +17.28 | +16.69 | 0.88 | 1.41 | +0.191 | resolved LOSS |
|
||||
| T=5 | 12.3 | +21.79 | +22.48 | 0.96 | 2.43 | +0.275 | resolved LOSS |
|
||||
| **CP mix** | | +13.89 | +13.77 | | | +0.238 (se 0.005, noise 0.020) | |
|
||||
|
||||
**D1+D2+D3 all three (WZ minus CP)**
|
||||
|
||||
| T | F layers per graph | d p50 us | d mean us | se | noise us | ms per graph | verdict |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | 32.3 | -1.47 | -1.69 | 0.79 | 0.16 | -0.055 | resolved gain |
|
||||
| T=2 | 26.8 | -1.34 | -1.85 | 0.47 | 0.45 | -0.049 | resolved gain |
|
||||
| T=3 | 22.3 | +0.13 | -0.33 | 0.29 | 0.83 | -0.007 | unresolved |
|
||||
| T=4 | 11.4 | +2.30 | +0.95 | 0.87 | 1.41 | +0.011 | unresolved |
|
||||
| T=5 | 12.3 | +0.58 | +1.82 | 0.81 | 2.43 | +0.022 | unresolved |
|
||||
| **CP mix** | | -0.08 | -0.07 | | | -0.011 (se 0.005, noise 0.020) | |
|
||||
|
||||
### 7. Additivity: WZ against the sum of the single-switch deltas (F-class phase, us per layer; p50 / mean)
|
||||
|
||||
| T | WD (D1) | WH (D2) | WW (D3) | sum | WZ (all three) | WZ - sum |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | -3.90 / -4.23 | -0.77 / -1.79 | +3.26 / +3.65 | -1.41 / -2.38 | -1.47 / -1.69 | -0.06 / +0.68 |
|
||||
| T=2 | -7.71 / -8.17 | -0.90 / -1.58 | +7.42 / +6.54 | -1.19 / -3.21 | -1.34 / -1.85 | -0.16 / +1.36 |
|
||||
| T=3 | -9.95 / -10.49 | -0.93 / -1.02 | +12.58 / +12.38 | +1.69 / +0.87 | +0.13 / -0.33 | -1.57 / -1.19 |
|
||||
| T=4 | -12.86 / -13.71 | -0.10 / -1.24 | +17.28 / +16.69 | +4.32 / +1.74 | +2.30 / +0.95 | -2.02 / -0.79 |
|
||||
| T=5 | -18.69 / -16.98 | -1.12 / -1.09 | +21.79 / +22.48 | +1.98 / +4.40 | +0.58 / +1.82 | -1.41 / -2.58 |
|
||||
|
||||
### 8. Classes C and X, class shares and the whole FFN phase (tier-state confounded)
|
||||
|
||||
Class share of the layers and the phase of the waiting classes. The phase of C and X is dominated by the arrival of the CPU rows / the PCIe leg, which differs between sessions; read it as context, not as a section delta.
|
||||
|
||||
| window | share F/C/X % | C phase p50 / mean us | X phase p50 / mean us |
|
||||
| --- | ---: | ---: | ---: |
|
||||
| T=1 CP | 67/27/5 | 101.3 / 116.1 | 210.5 / 221.8 |
|
||||
| T=1 WD | 74/21/5 | 109.2 / 131.4 | 238.4 / 268.7 |
|
||||
| T=1 WH | 71/24/5 | 102.9 / 122.9 | 204.3 / 229.5 |
|
||||
| T=1 WW | 76/22/2 | 106.1 / 123.2 | 195.0 / 205.5 |
|
||||
| T=1 WZ | 66/24/10 | 111.2 / 131.6 | 250.7 / 257.4 |
|
||||
| T=2 CP | 56/31/13 | 106.6 / 127.2 | 255.8 / 292.1 |
|
||||
| T=2 WD | 63/28/9 | 110.9 / 127.2 | 264.7 / 301.6 |
|
||||
| T=2 WH | 57/31/12 | 108.3 / 125.7 | 253.6 / 286.9 |
|
||||
| T=2 WW | 64/29/7 | 112.6 / 128.7 | 229.7 / 263.1 |
|
||||
| T=2 WZ | 53/32/15 | 112.2 / 128.5 | 264.9 / 296.8 |
|
||||
| T=3 CP | 46/37/17 | 111.7 / 128.9 | 254.9 / 299.8 |
|
||||
| T=3 WD | 40/29/30 | 121.4 / 138.0 | 307.4 / 382.3 |
|
||||
| T=3 WH | 43/37/20 | 115.8 / 132.1 | 265.8 / 310.3 |
|
||||
| T=3 WW | 52/34/14 | 122.4 / 139.4 | 251.4 / 284.3 |
|
||||
| T=3 WZ | 49/34/17 | 121.0 / 137.2 | 265.6 / 307.2 |
|
||||
| T=4 CP | 24/33/43 | 119.1 / 134.4 | 303.3 / 391.0 |
|
||||
| T=4 WD | 41/35/24 | 120.6 / 138.4 | 280.0 / 336.9 |
|
||||
| T=4 WH | 34/35/31 | 118.1 / 135.6 | 309.2 / 396.2 |
|
||||
| T=4 WW | 34/39/27 | 134.0 / 150.4 | 280.0 / 319.8 |
|
||||
| T=4 WZ | 38/34/28 | 134.1 / 150.5 | 309.4 / 370.7 |
|
||||
| T=5 CP | 26/35/39 | 131.1 / 147.5 | 283.8 / 332.4 |
|
||||
| T=5 WD | 31/30/39 | 128.0 / 148.3 | 319.4 / 380.3 |
|
||||
| T=5 WH | 25/36/39 | 131.2 / 149.5 | 284.7 / 333.4 |
|
||||
| T=5 WW | 28/36/36 | 154.3 / 169.0 | 301.4 / 346.8 |
|
||||
| T=5 WZ | 30/35/34 | 144.3 / 161.6 | 301.0 / 347.3 |
|
||||
|
||||
Delta to CP of the C and X phase, p50 / mean (se over graphs), us per layer. The windows without D3 (WD, WH) show how far these move for other reasons (tier state); the D3 windows (WW, WZ) are the ones to compare with the F-class loss of D3:
|
||||
|
||||
| T class | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: |
|
||||
| T=1 C | +7.8 / +20.6 (6.7) | +1.6 / +4.2 (4.7) | +4.8 / +5.7 (4.3) | +9.9 / +15.4 (6.0) |
|
||||
| T=1 X | +27.9 / +10.8 (21.2) | -6.3 / +22.2 (41.6) | -15.6 / -21.2 (13.6) | +40.2 / +39.8 (39.9) |
|
||||
| T=2 C | +4.3 / -0.7 (1.9) | +1.7 / -1.8 (1.8) | +6.0 / +1.6 (1.8) | +5.6 / +1.8 (2.1) |
|
||||
| T=2 X | +8.8 / -4.0 (12.9) | -2.3 / -17.3 (11.8) | -26.1 / -15.6 (12.3) | +9.1 / -14.7 (15.3) |
|
||||
| T=3 C | +9.7 / +10.0 (3.1) | +4.1 / +3.4 (1.4) | +10.7 / +11.2 (1.4) | +9.3 / +8.7 (1.4) |
|
||||
| T=3 X | +52.4 / +62.5 (20.5) | +10.8 / +26.2 (11.0) | -3.5 / +15.1 (8.2) | +10.7 / +6.1 (7.9) |
|
||||
| T=4 C | +1.4 / +2.1 (2.8) | -1.0 / +1.5 (3.6) | +14.8 / +14.3 (3.1) | +14.9 / +14.3 (3.1) |
|
||||
| T=4 X | -23.3 / -21.6 (21.7) | +5.9 / -14.6 (24.4) | -23.3 / -35.5 (21.7) | +6.1 / -19.0 (22.2) |
|
||||
| T=5 C | -3.1 / +0.5 (2.9) | +0.0 / +1.1 (1.6) | +23.1 / +21.4 (2.1) | +13.2 / +12.8 (1.9) |
|
||||
| T=5 X | +35.6 / +32.4 (21.4) | +0.9 / +0.9 (7.0) | +17.6 / +22.7 (8.4) | +17.2 / +6.0 (8.1) |
|
||||
|
||||
Shift-share of the whole FFN phase against CP, ms per graph (48 layers, CP's class shares as weights; the four terms add up to the total; se = standard error of the difference of the per-graph totals):
|
||||
|
||||
| window | within F | within C | within X | class mix | total | total se |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 WD | -0.150 | +0.201 | +0.119 | -0.299 | -0.129 | 0.320 |
|
||||
| T=1 WH | -0.069 | +0.089 | +0.019 | -0.165 | -0.126 | 0.303 |
|
||||
| T=1 WW | +0.112 | +0.093 | -0.041 | -0.461 | -0.297 | 0.224 |
|
||||
| T=1 WZ | -0.068 | +0.204 | +0.090 | +0.339 | +0.566 | 0.460 |
|
||||
| T=2 WD | -0.218 | +0.001 | +0.060 | -0.615 | -0.772 | 0.228 |
|
||||
| T=2 WH | -0.045 | -0.022 | -0.033 | -0.160 | -0.261 | 0.226 |
|
||||
| T=2 WW | +0.176 | +0.022 | -0.183 | -0.667 | -0.652 | 0.195 |
|
||||
| T=2 WZ | -0.053 | +0.019 | +0.030 | +0.240 | +0.237 | 0.288 |
|
||||
| T=3 WD | -0.237 | +0.161 | +0.660 | +1.855 | +2.438 | 0.805 |
|
||||
| T=3 WH | -0.025 | +0.056 | +0.084 | +0.436 | +0.550 | 0.252 |
|
||||
| T=3 WW | +0.278 | +0.185 | -0.125 | -0.381 | -0.042 | 0.177 |
|
||||
| T=3 WZ | -0.009 | +0.147 | +0.059 | -0.062 | +0.135 | 0.222 |
|
||||
| T=4 WD | -0.147 | +0.064 | -1.121 | -2.469 | -3.673 | 0.681 |
|
||||
| T=4 WH | -0.005 | +0.019 | +0.108 | -1.784 | -1.662 | 0.888 |
|
||||
| T=4 WW | +0.197 | +0.254 | -1.474 | -1.547 | -2.570 | 0.717 |
|
||||
| T=4 WZ | +0.020 | +0.255 | -0.419 | -2.146 | -2.290 | 0.758 |
|
||||
| T=5 WD | -0.201 | +0.013 | +0.907 | -0.248 | +0.470 | 0.753 |
|
||||
| T=5 WH | -0.014 | +0.033 | +0.021 | -0.047 | -0.008 | 0.346 |
|
||||
| T=5 WW | +0.273 | +0.361 | +0.272 | -0.377 | +0.530 | 0.383 |
|
||||
| T=5 WZ | +0.019 | +0.237 | +0.282 | -0.618 | -0.080 | 0.444 |
|
||||
|
||||
### 9. Verify graph duration (first kernel start to last kernel end), p50 ms, difference to CP in brackets (sanity total only)
|
||||
|
||||
| T | CP | WD | WH | WW | WZ |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| T=1 | 8.256 | 7.760 (-0.496) | 7.914 (-0.342) | 7.961 (-0.295) | 8.219 (-0.037) |
|
||||
| T=2 | 9.879 | 9.251 (-0.628) | 9.802 (-0.077) | 9.871 (-0.008) | 10.038 (+0.159) |
|
||||
| T=3 | 11.113 | 11.807 (+0.694) | 11.759 (+0.646) | 11.688 (+0.575) | 11.470 (+0.357) |
|
||||
| T=4 | 14.580 | 12.373 (-2.207) | 13.588 (-0.992) | 14.406 (-0.173) | 13.609 (-0.971) |
|
||||
| T=5 | 16.057 | 14.809 (-1.248) | 16.113 (+0.056) | 17.057 (+1.000) | 16.048 (-0.009) |
|
||||
|
||||
@@ -0,0 +1,755 @@
|
||||
"""FFN switches D1 (DOWN_SUB16), D2 (HITS_IN_COMBINE), D3 (WAIT_M_ROWS): section deltas from independent CUPTI windows.
|
||||
|
||||
Offline analysis of CUPTI trace directories (tools/cupti-trace, `lct.py`); host-side Python, stdlib only, no GPU.
|
||||
Built on the extract code of ffn_phase_timeline.py (layer records of the 48-doorbell verify graphs) and
|
||||
window_increment_report.py (verify graph = >= 900 kernels per correlation id, first and last two dropped, window rows
|
||||
T = grid of the CPU-row copy kernel / 10), generalised for the kernels the three switches rename or remove.
|
||||
|
||||
extract TRACE_DIR LABEL OUT.json.gz|- [--engine-log FILE] [--lct DIR] (python3 -B; reads one trace, no GPU)
|
||||
per layer the kernels from the doorbell to the end of the combine (offsets in ns, kernel family, stream, grid),
|
||||
per graph its span and window rows T, per T and kernel family the launch and per-graph-time summaries, the
|
||||
switch line of the engine log. `--lct` defaults to /data/leleka-e2e/decode/tools (read only).
|
||||
report CP WD WH WW WZ (the five extract files, CP first; markdown on stdout)
|
||||
|
||||
Roles of a layer's FFN half (kernel family -> role): DB doorbell, EQ expert-input quantize, WA wait A (plan copy),
|
||||
V_GU / V_DN gate-up and down of the VRAM-tier pass (first launch of the layer), P_GU / P_DN the same of the PCIe-tier
|
||||
pass (second launch), WB wait B (PCIe leg), WM wait M (CPU rows), CR copy rows, WC the D3 kernel (wait M + copy rows),
|
||||
AH add_hits (gone with D2), CB combine (`mtp_full_combine`, or the D2 `..._hits` kernel). Everything else is the
|
||||
shared-expert chain (SH, a side stream).
|
||||
The FFN phase is measured from the doorbell start to the END OF THE COMBINE: the same end in every variant (D2 removes
|
||||
`add_hits`, so the old end "add_hits end" does not exist there).
|
||||
Layer classes (as ffn_phase_timeline.py; they keep sessions with a different expert-tier state comparable):
|
||||
F no PCIe leg (wait B <= 3.5 us) and no CPU wait: the wait+copy region (wait M start to copy end; D3: the one
|
||||
kernel) is within 4 us of the 5th percentile of that region in the same window at the same T (the same rule in
|
||||
every variant, because D3 hides wait M inside its kernel)
|
||||
C CPU rows late, no PCIe leg; X PCIe leg (wait B above 3.5 us), with or without a CPU wait
|
||||
A verdict of "resolved" needs the p50 and the mean delta to agree in sign, |mean delta| above two standard errors
|
||||
(over graphs), and both above the noise. Noise of the F-class phase = the larger of (i) the sum of the p50 differences
|
||||
of the kernels no switch touches in the F-class chain (DB EQ WA V_GU WB) between CP and a variant and (ii) the
|
||||
first-half/second-half drift of the F-class phase p50 inside one window; noise of one device kernel = the largest p50
|
||||
drift of the untouched device kernels (hyper-connection, quantize). There is no repeat window of one configuration.
|
||||
"""
|
||||
import argparse
|
||||
import collections
|
||||
import gzip
|
||||
import json
|
||||
import re
|
||||
import statistics as st
|
||||
import sys
|
||||
|
||||
FIRST = {"chain_doorbell_publish": "DB", "doorbell_publish_res": "DB", "quantize_q8_1": "EQ",
|
||||
"chain_wait_copy_i32": "WA", "copy_i32_from_mapped": "PC", "native_gu_swiglu": "GU",
|
||||
"native_down_multi": "DN", "verify_wait_flag_ge": "WAIT", "wait_flag_ge": "WAIT", "fetch_blobs": "FB",
|
||||
"rebase_ptrs": "FB", "chain_copy_rows_from_mapped": "CR", "copy_rows_from_mapped": "CR", "add_hits": "AH",
|
||||
"mtp_full_combine": "CB", "leleka_verify_wait_copy_rows": "WC"}
|
||||
WAIT_FLOOR_US = 4.0
|
||||
B_LONG_US = 3.5
|
||||
SWITCH_RE = re.compile(r"requested Sm120Switches \{ (.*?) \}")
|
||||
|
||||
|
||||
def role_of(fam):
|
||||
if fam in FIRST:
|
||||
return FIRST[fam]
|
||||
if fam.startswith("sm120_moe_gu_swiglu"):
|
||||
return "GU"
|
||||
if fam.startswith(("window_moe_down", "sm120_moe_down")):
|
||||
return "DN"
|
||||
if fam.startswith("leleka_verify_combine"):
|
||||
return "CB"
|
||||
return "SH"
|
||||
|
||||
|
||||
def summary(values):
|
||||
v = sorted(values)
|
||||
if not v:
|
||||
return None
|
||||
at = lambda p: v[min(len(v) - 1, int(p * len(v)))] # noqa: E731
|
||||
return [len(v), st.mean(v), st.pstdev(v) if len(v) > 1 else 0.0, at(.1), at(.5), at(.9)] # n mean sd p10 p50 p90
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- extract (needs lct.py)
|
||||
def graphs_of(trace):
|
||||
by = collections.defaultdict(list)
|
||||
for k in trace.kernels:
|
||||
by[k.corr].append(k)
|
||||
ids = sorted((c for c, v in by.items() if len(v) >= 900), key=lambda c: min(k.start for k in by[c]))
|
||||
return [sorted(by[c], key=lambda k: k.start) for c in ids[2:-2]]
|
||||
|
||||
|
||||
def window_rows(ks, name):
|
||||
rows = collections.Counter(k.gx // 10 for k in ks if "copy_rows" in name(k))
|
||||
return rows.most_common(1)[0][0] if rows else -1
|
||||
|
||||
|
||||
def layer_record(lct, trace, fams, ks, bells, li):
|
||||
name = lambda k: trace.names.get(k.name, "?") # noqa: E731
|
||||
bell = ks[bells[li]]
|
||||
lo = ks[bells[li - 1]].start if li else ks[0].start
|
||||
nxt = ks[bells[li + 1]].start if li < len(bells) - 1 else bell.start + 600000
|
||||
seg = [k for k in ks if lo <= k.start < nxt]
|
||||
qsa = any("topk_cluster" in name(k) for k in seg if k.start < bell.start)
|
||||
ffn = [k for k in seg if k.start >= bell.start]
|
||||
comb = [k for k in ffn if "combine" in name(k)]
|
||||
if not comb:
|
||||
return None
|
||||
rec = []
|
||||
for k in [k for k in ffn if k.start <= comb[0].start]:
|
||||
fam = fams.setdefault(lct.family(name(k)), len(fams))
|
||||
rec.append([fam, k.stream, k.start - bell.start, k.end - k.start, k.gx, k.gy])
|
||||
return [0, li, int(qsa), 0, rec, comb[0].end - bell.start, comb[0].start - bell.start]
|
||||
|
||||
|
||||
def family_stats(lct, trace, graphs):
|
||||
"""Per window rows T and kernel family: launches (n mean sd p10 p50 p90 us) and per-graph time sum (ms)."""
|
||||
name = lambda k: trace.names.get(k.name, "?") # noqa: E731
|
||||
dur, per_graph, count = collections.defaultdict(list), collections.defaultdict(list), collections.Counter()
|
||||
for ks in graphs:
|
||||
t = window_rows(ks, name)
|
||||
count[t] += 1
|
||||
sums = collections.defaultdict(float)
|
||||
for k in ks:
|
||||
fam = lct.family(name(k))
|
||||
dur[(t, fam)].append((k.end - k.start) / 1e3)
|
||||
sums[fam] += (k.end - k.start) / 1e3
|
||||
for fam, s in sums.items():
|
||||
per_graph[(t, fam)].append(s)
|
||||
out = {}
|
||||
for (t, fam), v in dur.items():
|
||||
out.setdefault(str(t), {"graphs": count[t], "fam": {}})["fam"][fam] = {
|
||||
"launch": summary(v), "graph_sum": summary(per_graph[(t, fam)]), "per_graph": len(v) / count[t]}
|
||||
return out
|
||||
|
||||
|
||||
def switch_line(engine_log):
|
||||
if not engine_log:
|
||||
return None
|
||||
for line in open(engine_log, errors="replace"):
|
||||
m = SWITCH_RE.search(line)
|
||||
if m:
|
||||
return dict((a.strip(), b.strip()) for a, b in (x.split(":", 1) for x in m.group(1).split(", ")
|
||||
if ":" in x and "{" not in x and "}" not in x))
|
||||
return None
|
||||
|
||||
|
||||
def extract(path, label, out, lct_dir, engine_log):
|
||||
sys.path.insert(0, lct_dir)
|
||||
sys.dont_write_bytecode = True
|
||||
import lct
|
||||
trace = lct.Trace(path)
|
||||
name = lambda k: trace.names.get(k.name, "?") # noqa: E731
|
||||
graphs = graphs_of(trace)
|
||||
fams, layers, gmeta = {}, [], []
|
||||
for gi, ks in enumerate(graphs):
|
||||
t = window_rows(ks, name)
|
||||
gmeta.append([gi, t, max(k.end for k in ks) - ks[0].start, len(ks)])
|
||||
bells = [i for i, k in enumerate(ks) if "doorbell_publish" in name(k)]
|
||||
if len(bells) != 48:
|
||||
continue
|
||||
for li in range(48):
|
||||
rec = layer_record(lct, trace, fams, ks, bells, li)
|
||||
if rec:
|
||||
rec[0], rec[3] = gi, t
|
||||
layers.append(rec)
|
||||
blob = json.dumps({"path": path, "label": label, "switches": switch_line(engine_log), "graphs": gmeta,
|
||||
"fams": sorted(fams, key=fams.get), "layers": layers,
|
||||
"stats": family_stats(lct, trace, graphs)}, separators=(",", ":")).encode()
|
||||
sink = sys.stdout.buffer if out == "-" else open(out, "wb")
|
||||
sink.write(gzip.compress(blob, 6))
|
||||
sink.flush()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- loading, roles, classes
|
||||
MIN_GRAPHS = 25
|
||||
MAIN_T = (1, 2, 3, 4, 5, 6)
|
||||
CHAIN = ["DB", "EQ", "WA", "V_GU", "V_DN", "WB", "P_GU", "P_DN", "WM", "CR", "WC", "AH", "CB"]
|
||||
UNTOUCHED = ("DB", "EQ", "WA", "V_GU", "WB") # no switch changes these kernels
|
||||
TOUCHED = {"D1": ("V_DN", "P_DN", "P_GU"), "D2": ("AH", "CB"), "D3": ("WM", "CR", "WC")}
|
||||
SWITCH_OF = {"WD": "D1", "WH": "D2", "WW": "D3"}
|
||||
NAMES = {"D1": "DOWN_SUB16", "D2": "HITS_IN_COMBINE", "D3": "WAIT_M_ROWS"}
|
||||
DEVICE_CONTROLS = ("chain_gr_split", "chain_gr_down_t2w8_nb4", "chain_gr_up8", "quantize_q8_1")
|
||||
HOST_DEPENDENT = ("chain_doorbell_publish", "chain_wait_copy_i32") # wait on the host: shown, not used as a control
|
||||
MIN_GRAPHS_DRIFT = 40
|
||||
|
||||
|
||||
def pct(v, p):
|
||||
v = sorted(v)
|
||||
return v[min(len(v) - 1, int(p * len(v)))] if v else 0.0
|
||||
|
||||
|
||||
def mean(v):
|
||||
return st.mean(v) if v else 0.0
|
||||
|
||||
|
||||
def mean_se(v):
|
||||
return (mean(v), st.pstdev(v) / len(v) ** .5) if len(v) > 1 else (mean(v), 0.0)
|
||||
|
||||
|
||||
def view(fams, layer):
|
||||
"""role -> list of (start, end, stream, gx, gy) in ns from the doorbell start (first launch of a role first)."""
|
||||
roles, counts = collections.defaultdict(list), collections.Counter()
|
||||
body = sorted(layer[4], key=lambda k: k[2])
|
||||
n_waits = sum(1 for k in body if role_of(fams[k[0]]) == "WAIT")
|
||||
wait_names = ("WA", "WB", "WM") if n_waits == 3 else ("WB", "WM") if n_waits == 2 else ("WB",)
|
||||
for fam, stream, start, dur, gx, gy in body:
|
||||
role = role_of(fams[fam])
|
||||
if role in ("GU", "DN"):
|
||||
role = ("V_", "P_")[min(counts[role], 1)] + role
|
||||
elif role == "WAIT":
|
||||
role = wait_names[min(counts[role], len(wait_names) - 1)]
|
||||
counts[role_of(fams[fam])] += 1
|
||||
roles[role].append((start, start + dur, stream, gx, gy))
|
||||
return roles
|
||||
|
||||
|
||||
def seg_ns(roles):
|
||||
"""Wait-for-CPU-rows region: wait M start to copy end (D3: the one wait+copy kernel)."""
|
||||
if roles.get("WC"):
|
||||
return roles["WC"][0][1] - roles["WC"][0][0]
|
||||
if roles.get("WM") and roles.get("CR"):
|
||||
return roles["CR"][0][1] - roles["WM"][0][0]
|
||||
return None
|
||||
|
||||
|
||||
def span_after(roles, c):
|
||||
"""(wait start to combine end, copy end to combine end) in ns, the in-layer part after wait B."""
|
||||
first = roles.get("WC") or roles.get("WM")
|
||||
last = roles.get("WC") or roles.get("CR")
|
||||
if not first or not last:
|
||||
return None, None
|
||||
return c["phase"] - first[0][0], c["phase"] - last[0][1]
|
||||
|
||||
|
||||
def load(path):
|
||||
d = json.load(gzip.open(path))
|
||||
cells = []
|
||||
for lay in d["layers"]:
|
||||
roles = view(d["fams"], lay)
|
||||
wait_b = roles["WB"][0][1] - roles["WB"][0][0] if roles.get("WB") else 0
|
||||
cell = {"g": lay[0], "li": lay[1], "qsa": lay[2], "T": lay[3], "phase": lay[5], "cbs": lay[6], "R": roles,
|
||||
"wb": wait_b, "seg": seg_ns(roles)}
|
||||
cell["to_end"], cell["tail"] = span_after(roles, cell)
|
||||
cells.append(cell)
|
||||
for t in range(1, 9): # class threshold: the wait+copy floor of the window itself (5th percentile at this T)
|
||||
quiet = [c["seg"] for c in cells if c["T"] == t and c["seg"] and c["wb"] <= B_LONG_US * 1e3]
|
||||
floor = pct(quiet, .05) if len(quiet) >= 30 else None
|
||||
for c in (c for c in cells if c["T"] == t):
|
||||
c["cls"] = "X" if c["wb"] > B_LONG_US * 1e3 else (
|
||||
"C" if floor is None or (c["seg"] or 0) > floor + WAIT_FLOOR_US * 1e3 else "F")
|
||||
d["cells"] = cells
|
||||
d["n_graphs"] = collections.Counter(g[1] for g in d["graphs"])
|
||||
return d
|
||||
|
||||
|
||||
def sel(w, t=None, cls=None, qsa=None):
|
||||
return [c for c in w["cells"] if (t is None or c["T"] == t) and (cls is None or c["cls"] == cls)
|
||||
and (qsa is None or c["qsa"] == qsa)]
|
||||
|
||||
|
||||
def dur_us(c, role):
|
||||
r = c["R"].get(role)
|
||||
return (r[0][1] - r[0][0]) / 1e3 if r else None
|
||||
|
||||
|
||||
def us_or_none(ns):
|
||||
return ns / 1e3 if ns else None
|
||||
|
||||
|
||||
def routed_span_us(c):
|
||||
"""V_GU start to the end of the PCIe-pass down (the routed experts' chain incl. wait B and the gaps), us."""
|
||||
r = c["R"]
|
||||
return (r["P_DN"][0][1] - r["V_GU"][0][0]) / 1e3 if r.get("P_DN") and r.get("V_GU") else None
|
||||
|
||||
|
||||
def graph_means(cells, key):
|
||||
by = collections.defaultdict(list)
|
||||
for c in cells:
|
||||
v = key(c)
|
||||
if v is not None:
|
||||
by[c["g"]].append(v)
|
||||
return [mean(x) for x in by.values()]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- tables
|
||||
def md(header, rows):
|
||||
print("| " + " | ".join(header) + " |")
|
||||
print("| --- |" + " ---: |" * (len(header) - 1))
|
||||
for r in rows:
|
||||
print("| " + " | ".join(str(x) for x in r) + " |")
|
||||
print()
|
||||
|
||||
|
||||
def usable(ws, t):
|
||||
return all(w["n_graphs"].get(t, 0) >= MIN_GRAPHS for w in ws)
|
||||
|
||||
|
||||
def evidence(ws):
|
||||
print("### 1. What each window really ran\n")
|
||||
print("Switch line of `engine.log` (`requested Sm120Switches`) and the kernels launched per verify graph.\n")
|
||||
keys = ("down_sub16", "hits_in_combine", "wait_m_rows", "combine_vec4")
|
||||
rows = [["engine log " + k] + [w["switches"].get(k, "n/a") if w["switches"] else "n/a" for w in ws] for k in keys]
|
||||
total = lambda w: sum(w["n_graphs"].values()) # noqa: E731
|
||||
fams = ("window_moe_down_20", "window_moe_down_42", "sm120_moe_down_20", "sm120_moe_down_42", "add_hits",
|
||||
"mtp_full_combine", "leleka_verify_combine_k10_vec4_hits", "verify_wait_flag_ge",
|
||||
"chain_copy_rows_from_mapped", "leleka_verify_wait_copy_rows")
|
||||
for f in fams:
|
||||
cells = []
|
||||
for w in ws:
|
||||
n = sum(s["fam"][f]["launch"][0] for s in w["stats"].values() if f in s["fam"])
|
||||
cells.append("%.2f" % (n / total(w)))
|
||||
rows.append(["`%s` per graph" % f] + cells)
|
||||
rows.append(["verify graphs kept"] + [str(total(w)) for w in ws])
|
||||
md(["window"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def graph_counts(ws):
|
||||
print("### 2. Verify graphs per window rows T (kept graphs; a T with fewer than %d is not compared)\n" % MIN_GRAPHS)
|
||||
md(["T"] + [w["label"] for w in ws], [[t] + [w["n_graphs"].get(t, 0) for w in ws] for t in MAIN_T])
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- noise
|
||||
def untouched_offset(cp, w, t, cls="F"):
|
||||
"""Sum over the kernels no switch touches (DB EQ WA V_GU WB) of the p50 difference in the F-class chain, us."""
|
||||
tot = 0.0
|
||||
for role in UNTOUCHED:
|
||||
a = [dur_us(c, role) for c in sel(cp, t, cls) if dur_us(c, role) is not None]
|
||||
b = [dur_us(c, role) for c in sel(w, t, cls) if dur_us(c, role) is not None]
|
||||
tot += pct(b, .5) - pct(a, .5)
|
||||
return tot
|
||||
|
||||
|
||||
def noise_f(cp, variants, t):
|
||||
"""The noise estimate used for the F-class verdicts at T, us: the larger of (i) the largest offset of the
|
||||
untouched chain between CP and a variant and (ii) the largest first-half/second-half drift inside one window
|
||||
(windows with at least MIN_GRAPHS_DRIFT graphs at this T)."""
|
||||
offsets = [abs(untouched_offset(cp, w, t)) for w in variants]
|
||||
drifts = [abs(h[0] - h[1]) for w in [cp] + list(variants) for h in [halves(w, t)]
|
||||
if h and w["n_graphs"].get(t, 0) >= MIN_GRAPHS_DRIFT]
|
||||
return max(offsets + drifts)
|
||||
|
||||
|
||||
def noise_kernel(cp, variants, t):
|
||||
"""Noise of a single tier-independent device kernel, us: the largest p50 drift of the untouched device kernels."""
|
||||
out = [0.0]
|
||||
for fam in DEVICE_CONTROLS:
|
||||
base = cp["stats"].get(str(t), {"fam": {}})["fam"].get(fam)
|
||||
for w in variants:
|
||||
other = w["stats"].get(str(t), {"fam": {}})["fam"].get(fam)
|
||||
if base and other:
|
||||
out.append(abs(other["launch"][4] - base["launch"][4]))
|
||||
return max(out)
|
||||
|
||||
|
||||
def halves(w, t):
|
||||
"""F-class phase p50 of the first and the second half of the window's graphs (drift inside one session), us."""
|
||||
cells = sel(w, t, "F")
|
||||
gs = sorted({c["g"] for c in cells})
|
||||
if len(cells) < 2 * 100:
|
||||
return None
|
||||
mid = gs[len(gs) // 2]
|
||||
a = [c["phase"] / 1e3 for c in cells if c["g"] < mid]
|
||||
b = [c["phase"] / 1e3 for c in cells if c["g"] >= mid]
|
||||
return pct(a, .5), pct(b, .5)
|
||||
|
||||
|
||||
def noise_section(ws, ts):
|
||||
cp, variants = ws[0], ws[1:]
|
||||
print("### 3. Noise (no repeat window of one configuration exists)\n")
|
||||
print("(a) Kernels no switch touches, per-launch p50 difference to CP (us; largest |difference| over the four "
|
||||
"variants; CP's own p50 in brackets), from all launches of the verify graphs at that T. The first four are "
|
||||
"device-only kernels (they give the noise of one device kernel); the doorbell and the plan wait depend on "
|
||||
"the host and are shown for context only:\n")
|
||||
rows = []
|
||||
for fam in DEVICE_CONTROLS + HOST_DEPENDENT:
|
||||
cells = []
|
||||
for t in ts:
|
||||
base = cp["stats"].get(str(t), {"fam": {}})["fam"].get(fam)
|
||||
diffs = [w["stats"][str(t)]["fam"][fam]["launch"][4] - base["launch"][4] for w in variants
|
||||
if base and fam in w["stats"].get(str(t), {"fam": {}})["fam"]]
|
||||
cells.append("%.2f (%.2f)" % (max(abs(x) for x in diffs), base["launch"][4]) if diffs else "-")
|
||||
rows.append(["`%s`%s" % (fam, " (host-dependent)" if fam in HOST_DEPENDENT else "")] + cells)
|
||||
md(["kernel"] + ["T=%d" % t for t in ts], rows)
|
||||
print("(a2) The untouched kernels of the F-class chain (DB, EQ, WA, V_GU, WB), sum of the p50 differences to CP "
|
||||
"(us per layer); the noise used for the F-class verdicts is the largest of these and of the in-window "
|
||||
"drift (d):\n")
|
||||
rows = [[w["label"]] + ["%+.2f" % untouched_offset(cp, w, t) for t in ts] for w in variants]
|
||||
rows.append(["**noise used: max of the rows above and of (d)**"] + ["%.2f" % noise_f(cp, variants, t)
|
||||
for t in ts])
|
||||
rows.append(["noise of one device kernel (a)"] + ["%.2f" % noise_kernel(cp, variants, t) for t in ts])
|
||||
md(["window"] + ["T=%d" % t for t in ts], rows)
|
||||
print("(d) Drift inside one session: F-class phase p50 of the first half of the graphs minus the second half "
|
||||
"(us per layer; every window, same T; windows with at least %d graphs and 100 F layers per half enter the "
|
||||
"noise):\n" % MIN_GRAPHS_DRIFT)
|
||||
rows = []
|
||||
for w in ws:
|
||||
cells = []
|
||||
for t in ts:
|
||||
h = halves(w, t)
|
||||
cells.append("%+.2f" % (h[0] - h[1]) if h else "-")
|
||||
rows.append([w["label"]] + cells)
|
||||
md(["window"] + ["T=%d" % t for t in ts], rows)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- per-launch tables (D1, D2, D3)
|
||||
def role_cell(w, t, role, cls=None):
|
||||
xs = [dur_us(c, role) for c in sel(w, t, cls) if dur_us(c, role) is not None]
|
||||
if not xs:
|
||||
return "-"
|
||||
graphs = len({c["g"] for c in sel(w, t)})
|
||||
return "%.2f (%.1f)" % (pct(xs, .5), sum(len(c["R"][role]) for c in sel(w, t, cls) if role in c["R"]) / graphs)
|
||||
|
||||
|
||||
def grid_cell(w, t, role):
|
||||
cnt = collections.Counter((c["R"][role][0][3], c["R"][role][0][4]) for c in sel(w, t) if c["R"].get(role))
|
||||
if not cnt:
|
||||
return "-"
|
||||
top = cnt.most_common(2)
|
||||
return " + ".join("%dx%d" % g for g, _ in top)
|
||||
|
||||
|
||||
def launch_tables(ws, ts, title, roles, cls):
|
||||
print(title + "\n")
|
||||
for t in ts:
|
||||
print("T=%d (graphs %s)\n" % (t, " / ".join(str(w["n_graphs"].get(t, 0)) for w in ws)))
|
||||
rows = [[r + (" [%s]" % cls if cls else "")] + [role_cell(w, t, r, cls) for w in ws] for r in roles]
|
||||
md(["role: p50 us (launches per graph)"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def grids(ws, ts):
|
||||
print("Grid (x by y blocks) of the launches, most common first (VRAM pass, PCIe pass, PCIe gate/up):\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for role in ("V_DN", "P_DN", "P_GU"):
|
||||
rows.append(["T=%d %s" % (t, role)] + [grid_cell(w, t, role) for w in ws])
|
||||
md(["launch"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def f_chain_table(ws, ts):
|
||||
print("F-class chain of one layer: p50 per role (us), the routed span (V_GU start to PCIe-pass down end), the "
|
||||
"wait-to-end span (wait M or D3 kernel start to combine end), the tail (copy or D3 end to combine end) and "
|
||||
"the whole FFN phase (doorbell start to combine end). Layers: no PCIe leg, no CPU wait.\n")
|
||||
for t in ts:
|
||||
cells = [sel(w, t, "F") for w in ws]
|
||||
rows = []
|
||||
for r in CHAIN:
|
||||
vals = [[dur_us(c, r) for c in cs if dur_us(c, r) is not None] for cs in cells]
|
||||
rows.append([r] + ["%.2f" % pct(v, .5) if v else "-" for v in vals])
|
||||
parts = (("routed span", routed_span_us), ("wait-to-end span", lambda c: us_or_none(c["to_end"])),
|
||||
("tail after the copy", lambda c: us_or_none(c["tail"])),
|
||||
("**FFN phase (combine end)**", lambda c: c["phase"] / 1e3))
|
||||
for label, f in parts:
|
||||
rows.append([label] + ["%.2f" % pct([x for x in map(f, cs) if x is not None], .5) for cs in cells])
|
||||
rows.append(["F layers (graphs)"] + ["%d (%d)" % (len(cs), len({c["g"] for c in cs})) for cs in cells])
|
||||
print("T=%d\n" % t)
|
||||
md(["role / span"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def d3_floor(ws, ts):
|
||||
print("D3 kernel floor: wait+copy region of F-class layers (CP/WD/WH: wait M start to copy end; WW/WZ: the "
|
||||
"`leleka_verify_wait_copy_rows` duration), p50 us, against the blocks of the copy (T x 10):\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
row = ["T=%d (%d blocks)" % (t, 10 * t)]
|
||||
for w in ws:
|
||||
v = [c["seg"] / 1e3 for c in sel(w, t, "F") if c["seg"]]
|
||||
row.append("%.2f" % pct(v, .5) if v else "-")
|
||||
rows.append(row)
|
||||
md(["T"] + [w["label"] for w in ws], rows)
|
||||
xs, ys = [], []
|
||||
for w in (ws[3], ws[4]):
|
||||
for t in range(1, 9):
|
||||
v = [c["seg"] / 1e3 for c in w["cells"] if c["T"] == t and c["wb"] <= B_LONG_US * 1e3 and c["seg"]]
|
||||
if len(v) >= 100:
|
||||
xs.append(10.0 * t)
|
||||
ys.append(pct(v, .05))
|
||||
n, sx, sy = len(xs), sum(xs), sum(ys)
|
||||
slope = (n * sum(a * b for a, b in zip(xs, ys)) - sx * sy) / (n * sum(a * a for a in xs) - sx * sx)
|
||||
print("Least-squares line through the 5th percentile of the D3 kernel (WW and WZ, T 1..8, %d points): "
|
||||
"%.2f us + %.3f us per block. The CP pair (wait M + copy) stays at %.2f us from T=1 to T=6.\n" % (
|
||||
n, (sy - slope * sx) / n, slope, pct([c["seg"] / 1e3 for c in sel(ws[0], 3) if c["seg"]], .05)))
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- F-class phase, verdicts
|
||||
def f_stats(w, t, cls="F"):
|
||||
cells = sel(w, t, cls)
|
||||
gm = graph_means(cells, lambda c: c["phase"] / 1e3)
|
||||
m, se = mean_se(gm)
|
||||
graphs = len({c["g"] for c in sel(w, t)})
|
||||
return {"n": len(cells), "g": len(gm), "p50": pct([c["phase"] / 1e3 for c in cells], .5), "mean": m, "se": se,
|
||||
"per_graph": len(cells) / graphs if graphs else 0.0}
|
||||
|
||||
|
||||
def delta(a, b):
|
||||
return {"p50": b["p50"] - a["p50"], "mean": b["mean"] - a["mean"], "se": (a["se"] ** 2 + b["se"] ** 2) ** .5}
|
||||
|
||||
|
||||
def verdict(d, noise):
|
||||
same_sign = (d["p50"] > 0) == (d["mean"] > 0)
|
||||
if same_sign and abs(d["mean"]) > 2 * d["se"] and min(abs(d["p50"]), abs(d["mean"])) > noise:
|
||||
return "resolved " + ("gain" if d["mean"] < 0 else "LOSS")
|
||||
return "unresolved"
|
||||
|
||||
|
||||
def f_phase_section(ws, ts):
|
||||
cp, variants = ws[0], ws[1:]
|
||||
print("### 5. FFN phase of the F-class layers (doorbell start to combine end), per T\n")
|
||||
print("p50 over layers; mean and standard error (se) over graphs of the per-graph mean of the F layers of that "
|
||||
"graph. Delta = window minus CP (negative = faster). Noise = the untouched-chain offset of section 3. "
|
||||
"Per graph = mean delta x CP's F layers per graph at this T.\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
a = f_stats(cp, t)
|
||||
rows.append(["T=%d CP" % t, a["n"], a["g"], "%.2f" % a["p50"], "%.2f" % a["mean"], "%.2f" % a["se"]]
|
||||
+ [""] * 6)
|
||||
for w in variants:
|
||||
b = f_stats(w, t)
|
||||
d = delta(a, b)
|
||||
nz = noise_f(cp, variants, t)
|
||||
rows.append(["T=%d %s" % (t, w["label"]), b["n"], b["g"], "%.2f" % b["p50"], "%.2f" % b["mean"],
|
||||
"%.2f" % b["se"], "%+.2f" % d["p50"], "%+.2f" % d["mean"], "%.2f" % d["se"], "%.2f" % nz,
|
||||
"%+.3f" % (d["mean"] * a["per_graph"] / 1e3), verdict(d, nz)])
|
||||
md(["window", "F layers", "graphs", "p50 us", "mean us", "se", "d p50", "d mean", "se of d", "noise",
|
||||
"ms per graph", "verdict"], rows)
|
||||
|
||||
|
||||
def summary_section(ws, ts):
|
||||
cp = ws[0]
|
||||
print("### 6. Per switch: F-class section delta, per T and weighted by CP's T mix\n")
|
||||
for w in ws[1:]:
|
||||
name = SWITCH_OF.get(w["label"], "D1+D2+D3")
|
||||
rows, wsum = [], 0.0
|
||||
tot = {"p": 0.0, "m": 0.0, "g": 0.0, "n": 0.0, "se": 0.0}
|
||||
for t in ts:
|
||||
a, b = f_stats(cp, t), f_stats(w, t)
|
||||
d = delta(a, b)
|
||||
nz = noise_f(cp, ws[1:], t)
|
||||
wt = cp["n_graphs"][t]
|
||||
fpg = a["per_graph"] / 1e3
|
||||
wsum += wt
|
||||
tot["p"] += wt * d["p50"]
|
||||
tot["m"] += wt * d["mean"]
|
||||
tot["g"] += wt * d["mean"] * fpg
|
||||
tot["se"] += (wt * d["se"] * fpg) ** 2
|
||||
tot["n"] += wt * nz * fpg
|
||||
rows.append(["T=%d" % t, "%.1f" % a["per_graph"], "%+.2f" % d["p50"], "%+.2f" % d["mean"], "%.2f" % d["se"],
|
||||
"%.2f" % nz, "%+.3f" % (d["mean"] * fpg), verdict(d, nz)])
|
||||
rows.append(["**CP mix**", "", "%+.2f" % (tot["p"] / wsum), "%+.2f" % (tot["m"] / wsum), "", "",
|
||||
"%+.3f (se %.3f, noise %.3f)" % (tot["g"] / wsum, tot["se"] ** .5 / wsum, tot["n"] / wsum), ""])
|
||||
print("**%s %s (%s minus CP)**\n" % (name, NAMES.get(name, "all three"), w["label"]))
|
||||
md(["T", "F layers per graph", "d p50 us", "d mean us", "se", "noise us", "ms per graph", "verdict"], rows)
|
||||
|
||||
|
||||
def additivity(ws, ts):
|
||||
cp = ws[0]
|
||||
print("### 7. Additivity: WZ against the sum of the single-switch deltas (F-class phase, us per layer; "
|
||||
"p50 / mean)\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
a = f_stats(cp, t)
|
||||
ds = [delta(a, f_stats(w, t)) for w in ws[1:]]
|
||||
sp = sum(d["p50"] for d in ds[:3])
|
||||
sm = sum(d["mean"] for d in ds[:3])
|
||||
rows.append(["T=%d" % t] + ["%+.2f / %+.2f" % (d["p50"], d["mean"]) for d in ds[:3]] +
|
||||
["%+.2f / %+.2f" % (sp, sm), "%+.2f / %+.2f" % (ds[3]["p50"], ds[3]["mean"]),
|
||||
"%+.2f / %+.2f" % (ds[3]["p50"] - sp, ds[3]["mean"] - sm)])
|
||||
md(["T", "WD (D1)", "WH (D2)", "WW (D3)", "sum", "WZ (all three)", "WZ - sum"], rows)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- other classes and totals
|
||||
def graph_totals(w, t):
|
||||
"""Whole-FFN-phase time per graph (sum over the 48 layers, ms) of the graphs of T rows that have all 48."""
|
||||
tot, cnt = collections.defaultdict(float), collections.Counter()
|
||||
for c in sel(w, t):
|
||||
tot[c["g"]] += c["phase"] / 1e6
|
||||
cnt[c["g"]] += 1
|
||||
return [v for g, v in tot.items() if cnt[g] == 48]
|
||||
|
||||
|
||||
def shift_share(cp, w, t):
|
||||
a, b = sel(cp, t), sel(w, t)
|
||||
terms, mix = {}, 0.0
|
||||
total = 48 * (mean([c["phase"] for c in b]) - mean([c["phase"] for c in a])) / 1e6
|
||||
for cls in "FCX":
|
||||
ac, bc = [c["phase"] for c in a if c["cls"] == cls], [c["phase"] for c in b if c["cls"] == cls]
|
||||
w_a, w_b = len(ac) / len(a), len(bc) / len(b)
|
||||
terms[cls] = 48 * w_a * (mean(bc) - mean(ac)) / 1e6
|
||||
mix += 48 * (w_b - w_a) * mean(bc) / 1e6
|
||||
ga, gb = graph_totals(cp, t), graph_totals(w, t)
|
||||
se = (mean_se(ga)[1] ** 2 + mean_se(gb)[1] ** 2) ** .5
|
||||
return ["%+.3f" % terms["F"], "%+.3f" % terms["C"], "%+.3f" % terms["X"], "%+.3f" % mix, "%+.3f" % total,
|
||||
"%.3f" % se]
|
||||
|
||||
|
||||
def class_section(ws, ts):
|
||||
cp, variants = ws[0], ws[1:]
|
||||
print("### 8. Classes C and X, class shares and the whole FFN phase (tier-state confounded)\n")
|
||||
print("Class share of the layers and the phase of the waiting classes. The phase of C and X is dominated by "
|
||||
"the arrival of the CPU rows / the PCIe leg, which differs between sessions; read it as context, not as a "
|
||||
"section delta.\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for w in ws:
|
||||
cs = sel(w, t)
|
||||
share = {k: 100.0 * len(sel(w, t, k)) / len(cs) for k in "FCX"}
|
||||
row = ["T=%d %s" % (t, w["label"]), "%.0f/%.0f/%.0f" % tuple(share[k] for k in "FCX")]
|
||||
for cls in "CX":
|
||||
x = [c["phase"] / 1e3 for c in sel(w, t, cls)]
|
||||
row.append("%.1f / %.1f" % (pct(x, .5), mean(x)))
|
||||
rows.append(row)
|
||||
md(["window", "share F/C/X %", "C phase p50 / mean us", "X phase p50 / mean us"], rows)
|
||||
print("Delta to CP of the C and X phase, p50 / mean (se over graphs), us per layer. The windows without D3 (WD, "
|
||||
"WH) show how far these move for other reasons (tier state); the D3 windows (WW, WZ) are the ones to "
|
||||
"compare with the F-class loss of D3:\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for cls in "CX":
|
||||
a = f_stats(cp, t, cls)
|
||||
row = ["T=%d %s" % (t, cls)]
|
||||
for w in variants:
|
||||
d = delta(a, f_stats(w, t, cls))
|
||||
row.append("%+.1f / %+.1f (%.1f)" % (d["p50"], d["mean"], d["se"]))
|
||||
rows.append(row)
|
||||
md(["T class"] + [w["label"] for w in variants], rows)
|
||||
print("Shift-share of the whole FFN phase against CP, ms per graph (48 layers, CP's class shares as weights; "
|
||||
"the four terms add up to the total; se = standard error of the difference of the per-graph totals):\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for w in variants:
|
||||
rows.append(["T=%d %s" % (t, w["label"])] + shift_share(cp, w, t))
|
||||
md(["window", "within F", "within C", "within X", "class mix", "total", "total se"], rows)
|
||||
|
||||
|
||||
def span_section(ws, ts):
|
||||
print("### 9. Verify graph duration (first kernel start to last kernel end), p50 ms, difference to CP in brackets "
|
||||
"(sanity total only)\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
row, base = ["T=%d" % t], None
|
||||
for w in ws:
|
||||
p = pct([g[2] / 1e6 for g in w["graphs"] if g[1] == t], .5)
|
||||
base = p if base is None else base
|
||||
row.append("%.3f" % p if w is ws[0] else "%.3f (%+.3f)" % (p, p - base))
|
||||
rows.append(row)
|
||||
md(["T"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def by_kind_section(ws, ts):
|
||||
print("F-class FFN phase p50 by layer kind (us; 36 GDN layers and 12 QSA layers per graph):\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for kind, kn in ((0, "gdn"), (1, "qsa")):
|
||||
rows.append(["T=%d %s" % (t, kn)] + ["%.2f" % pct([c["phase"] / 1e3 for c in sel(w, t, "F", kind)], .5)
|
||||
for w in ws])
|
||||
md(["T kind"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def kernel_delta_section(ws, ts):
|
||||
cp, variants = ws[0], ws[1:]
|
||||
print("### 4b. Kernel-level deltas in the F-class chain, window minus CP (p50 us per layer)\n")
|
||||
print("Columns: the VRAM-pass down, the PCIe-pass down, the PCIe-pass gate/up (D1); the wait+copy region (D3: wait "
|
||||
"M start to copy end, or the one kernel); `add_hits` plus combine from the end of the copy region to the end "
|
||||
"of the combine (D2: the tail); the routed span V_GU start to P_DN end. Noise of one device kernel from "
|
||||
"section 3 (a) in the last column.\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
a = {r: pct([dur_us(c, r) for c in sel(cp, t, "F") if dur_us(c, r) is not None], .5)
|
||||
for r in ("V_DN", "P_DN", "P_GU")}
|
||||
a["seg"] = pct([c["seg"] / 1e3 for c in sel(cp, t, "F") if c["seg"]], .5)
|
||||
a["tail"] = pct([c["tail"] / 1e3 for c in sel(cp, t, "F") if c["tail"]], .5)
|
||||
a["span"] = pct([routed_span_us(c) for c in sel(cp, t, "F") if routed_span_us(c)], .5)
|
||||
for w in variants:
|
||||
b = {r: pct([dur_us(c, r) for c in sel(w, t, "F") if dur_us(c, r) is not None], .5)
|
||||
for r in ("V_DN", "P_DN", "P_GU")}
|
||||
b["seg"] = pct([c["seg"] / 1e3 for c in sel(w, t, "F") if c["seg"]], .5)
|
||||
b["tail"] = pct([c["tail"] / 1e3 for c in sel(w, t, "F") if c["tail"]], .5)
|
||||
b["span"] = pct([routed_span_us(c) for c in sel(w, t, "F") if routed_span_us(c)], .5)
|
||||
rows.append(["T=%d %s" % (t, w["label"])] + ["%+.2f" % (b[k] - a[k]) for k in
|
||||
("V_DN", "P_DN", "P_GU", "seg", "tail", "span")]
|
||||
+ ["%.2f" % noise_kernel(cp, variants, t)])
|
||||
md(["window", "d V_DN", "d P_DN", "d P_GU", "d wait+copy", "d tail", "d routed span", "noise (kernel)"], rows)
|
||||
|
||||
|
||||
def tail_section(ws, ts):
|
||||
cp, variants = ws[0], ws[1:]
|
||||
print("### 4c. The tail after the copy of the CPU rows (copy or D3 kernel end to combine end), all classes\n")
|
||||
print("This part of a layer is after the last wait, so it is on the critical path in every layer, waiting or not, "
|
||||
"and does not depend on the expert tier. p50 us per layer; the last columns are the mean delta x 48 layers "
|
||||
"in ms per graph and its verdict against the single-kernel noise.\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for cls in ("F", "C", "X", None):
|
||||
a = [c["tail"] / 1e3 for c in sel(cp, t, cls) if c["tail"]]
|
||||
gm_a = graph_means(sel(cp, t, cls), lambda c: c["tail"] / 1e3 if c["tail"] else None)
|
||||
row = ["T=%d %s" % (t, cls or "all"), "%.2f" % pct(a, .5)]
|
||||
for w in variants:
|
||||
b = [c["tail"] / 1e3 for c in sel(w, t, cls) if c["tail"]]
|
||||
gm_b = graph_means(sel(w, t, cls), lambda c: c["tail"] / 1e3 if c["tail"] else None)
|
||||
d = {"p50": pct(b, .5) - pct(a, .5), "mean": mean_se(gm_b)[0] - mean_se(gm_a)[0],
|
||||
"se": (mean_se(gm_a)[1] ** 2 + mean_se(gm_b)[1] ** 2) ** .5}
|
||||
row.append("%+.2f (%+.3f ms, %s)" % (d["p50"], 48 * d["mean"] / 1e3,
|
||||
verdict(d, noise_kernel(cp, variants, t))))
|
||||
rows.append(row)
|
||||
md(["T class", "CP p50"] + ["%s d p50 (per graph)" % w["label"] for w in variants], rows)
|
||||
|
||||
|
||||
def x_class_section(ws, ts):
|
||||
print("### 4d. D1 in the layers with a PCIe leg (class X): gate/up and down of both passes, p50 / mean us\n")
|
||||
rows = []
|
||||
for t in ts:
|
||||
for role in ("V_DN", "P_GU", "P_DN"):
|
||||
row = ["T=%d %s [X]" % (t, role)]
|
||||
for w in ws:
|
||||
x = [dur_us(c, role) for c in sel(w, t, "X") if dur_us(c, role) is not None]
|
||||
row.append("%.2f / %.2f" % (pct(x, .5), mean(x)) if x else "-")
|
||||
rows.append(row)
|
||||
md(["launch"] + [w["label"] for w in ws], rows)
|
||||
|
||||
|
||||
def report(paths):
|
||||
ws = [load(p) for p in paths]
|
||||
ts = [t for t in MAIN_T if usable(ws, t)]
|
||||
print("Windows: " + ", ".join("%s = %s" % (w["label"], w["path"]) for w in ws))
|
||||
print("T compared (at least %d graphs in all five windows): %s\n" % (MIN_GRAPHS, ts))
|
||||
evidence(ws)
|
||||
graph_counts(ws)
|
||||
noise_section(ws, ts)
|
||||
print("### 4. Per-launch kernels of the three switches\n")
|
||||
print("#### D1 DOWN_SUB16: routed experts' gate/up and down, VRAM pass (V) and PCIe pass (P)\n")
|
||||
launch_tables(ws, ts, "All layers, p50 us (launches per graph):", ("V_GU", "V_DN", "P_GU", "P_DN"), None)
|
||||
launch_tables(ws, ts, "F-class layers only:", ("V_DN", "P_DN", "P_GU"), "F")
|
||||
grids(ws, ts)
|
||||
print("#### D2 HITS_IN_COMBINE and D3 WAIT_M_ROWS\n")
|
||||
launch_tables(ws, ts, "All layers, p50 us (launches per graph):", ("WM", "CR", "WC", "AH", "CB"), None)
|
||||
launch_tables(ws, ts, "F-class layers only:", ("WM", "CR", "WC", "AH", "CB"), "F")
|
||||
d3_floor(ws, ts)
|
||||
x_class_section(ws, ts)
|
||||
kernel_delta_section(ws, ts)
|
||||
tail_section(ws, ts)
|
||||
f_chain_table(ws, ts)
|
||||
by_kind_section(ws, ts)
|
||||
f_phase_section(ws, ts)
|
||||
summary_section(ws, ts)
|
||||
additivity(ws, ts)
|
||||
class_section(ws, ts)
|
||||
span_section(ws, ts)
|
||||
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
sub = ap.add_subparsers(dest="cmd", required=True)
|
||||
e = sub.add_parser("extract")
|
||||
e.add_argument("trace")
|
||||
e.add_argument("label")
|
||||
e.add_argument("out")
|
||||
e.add_argument("--lct", default="/data/leleka-e2e/decode/tools")
|
||||
e.add_argument("--engine-log")
|
||||
r = sub.add_parser("report")
|
||||
r.add_argument("files", nargs=5, metavar="CP WD WH WW WZ")
|
||||
a = ap.parse_args()
|
||||
if a.cmd == "extract":
|
||||
extract(a.trace, a.label, a.out, a.lct, a.engine_log)
|
||||
else:
|
||||
report(a.files)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user