docs(prefill): laptop A/B of the compute-stage kernels
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f29d8ad400
commit
935678805c
@@ -212,3 +212,24 @@ at the hardware limit), recurrence 155, convolution 17, output norm 16, L2 6, de
|
||||
bookkeeping ~75; QSA attention 113 (already tensor-core `mma`), index/norm/rope 38, Q projection 33, Out projection 17, KV
|
||||
append 14; GR reads: mix 47, GEMMs 70; injection (write + next norm) 55. What is left outside the expert ring (~1.04 s) is
|
||||
bandwidth-, tensor-core- or latency-bound; the per-stage host drains remain (claude/prefill-overlap).
|
||||
|
||||
### Laptop (RTX 3080, WSL2, mapped experts, VRAM tier auto + profile, KAR file; `~/LAPTOP_GPU.lock`)
|
||||
|
||||
Prompts of 300 / 1,200 / 2,600 tokens (the first 2,600 ids of job 0708's 8,000-token prompt), chunk 2,048, 16 greedy tokens,
|
||||
`LELEKA_LAPTOP_PROMPT_CACHE=0`; ABAB of the all-switches-off arm and the defaults, two passes per process. Greedy outputs
|
||||
of all runs are identical, and with `LELEKA_TRACE_PREFILL_R=1` the hash of the final residual of every chunk (299, 1,199, 2,048,
|
||||
551 rows) is identical between the arms. Sum over the four chunks of the warm pass, mean of the two processes (ms):
|
||||
|
||||
| stage | switches off | defaults |
|
||||
| --- | --- | --- |
|
||||
| input + init | 588 | 9 |
|
||||
| attn_read + ffn_read | 553 | 416 |
|
||||
| inject | 288 | 211 |
|
||||
| gdn (compute 1,192 -> 865; state_in 353 -> 288; state_out 331 -> 324) | 2,016 | 1,586 |
|
||||
| qsa | 654 | 569 |
|
||||
| moe.ring (expert bytes over PCIe/page cache: unchanged) | 19,204 | 19,650 |
|
||||
|
||||
The GDN weight dequantization, 0.80 s of a short prompt's GDN on this card, is now 36 ms per 2,048-token chunk
|
||||
(`gdn#3/#5/#20`); end-to-end prefill tok/s moves by 0-5% because the expert DMA from the page cache is 85% of the time.
|
||||
The remaining laptop-only costs are `input.ple` (random 20-byte reads of the 55 GB KAR file that is not in the page cache:
|
||||
~0.5-1 s per prompt, 32 reader threads) and the 3 MB state download (`gdn.state_out`, WSL pageable copy).
|
||||
|
||||
Reference in New Issue
Block a user