| <!-- generated by bench/aggregate_rooflines.py; do not edit by hand --> |
| # ANE roofline results |
| |
| Accumulated across **4 machine(s)**, 6 submission(s). Each row is a distinct machine (grouped by hardware hash; identical silicon in different chassis stays separate by model identifier). |
| |
| Add yours: `PYTHONPATH=. python3 bench/roofline_suite.py --contributor <your-gh-handle>`, commit the JSON it writes under `bench/results/rooflines/`, regenerate this file with `python3 bench/aggregate_rooflines.py`, and open a PR. See [`rooflines/README.md`](rooflines/README.md). |
| |
| Thanks to [@axiom-of-choice](https://github.com/axiom-of-choice), [@diegobauavi](https://github.com/diegobauavi), [@sbryngelson](https://github.com/sbryngelson) for contributing datapoints. |
| |
| ## Machines |
| |
| | Chip | Model | CPU (P+E) | GPU | Memory | macOS | Power | Code (main merge-base) | By | Runs | |
| | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | |
| | Apple M1 | MacBookPro17,1 | 4+4 | 8 | 16 GB unified | 26.5.2 (25F84) | ac | 263e02ff1898 | [@diegobauavi](https://github.com/diegobauavi) | 1 | |
| | Apple M1 Max | MacBookPro18,2 | 8+2 | 32 | 32 GB unified | 26.5.1 (25F80) | ac (high-power) | 1f8b477a5397 | [@sbryngelson](https://github.com/sbryngelson) | 2 | |
| | Apple M2 Pro | Mac14,12 | 6+4 | 16 | 32 GB unified | 26.5.2 (25F84) | ac | 64108472d01f (dirty) | [@axiom-of-choice](https://github.com/axiom-of-choice) | 2 | |
| | Apple M5 Pro | Mac17,8 | 6+12 | 20 | 48 GB unified | 26.5.1 (25F80) | ac (high-power) | 55a1c6afdad3 (dirty) | [@sbryngelson](https://github.com/sbryngelson) | 1 | |
| |
| ## Numeric cliffs (correctness rooflines) |
| |
| Where fp16 math on the engine silently goes wrong (issue #115, docs/cross-chip.md). These are magnitude thresholds, independent of clock, so they are valid even on battery. |
| |
| | Chip | Model | matmul inf-cliff | slice-x16 (Q.4 crop-DMA) | reduce exact-sum | |
| | --- | --- | --- | --- | --- | |
| | Apple M1 | MacBookPro17,1 | ~32759 | clamp @ 4094 | <= 2048 | |
| | Apple M1 Max | MacBookPro18,2 | ~32759 | clamp @ 4094 | <= 2048 | |
| | Apple M2 Pro | Mac14,12 | ~32759 | clamp @ 4094 | <= 2048 | |
| | Apple M5 Pro | Mac17,8 | ~32759 | exact (no clamp) | <= 2048 | |
| |
| _matmul: output magnitude that flips finite->inf (~fp16_max/2). slice: the pre-A16 crop-DMA clamps |value|>4094; 'exact' means the clamp is gone (A16/M5). reduce: largest all-exact integer row-sum (fp16 grid coarsens past 2048)._ |
|
|
| ## Performance rooflines (headline) |
|
|
| Peak ANE numbers only; the full per-size sweeps, all-engine comparison, and per-rail watts live in each machine's JSON under `perf_rooflines`. Perf depends on power/thermals, so the state is shown per row. |
|
|
| **Peak fp16 GEMM (TF/s)** is the headline compute number -- measured directly on every machine and the most robust cross-chip comparison. Bandwidth/ridge come from the streaming sweep and are more dispatch-overhead-sensitive on smaller/older parts, so read them as indicative. Decode is migrating to a tiled vocab head (#181); see the note under the table. |
|
|
| | Chip | Model | Peak fp16 GEMM (TF/s) | Bandwidth (GB/s) | Ridge (FLOP/byte) | Peak perf/W (GF/s/W) | Decode @b1 (tok/s) | Power | |
| | --- | --- | --- | --- | --- | --- | --- | --- | |
| | Apple M1 | MacBookPro17,1 | 2.7 | 0.86 | 3149 | 442 | n/a | ac | |
| | Apple M1 Max | MacBookPro18,2 | 4.6 | 7.4 | 616 | 897 | 244 | ac (high-power) | |
| | Apple M2 Pro | Mac14,12 | 3.4 | 0.98 | 3429 | 744 | 276 | ac | |
| | Apple M5 Pro | Mac17,8 | 10.0 | 24 | 418 | 918 | 117 | ac (high-power) | |
|
|
| _`n/a` decode = a stale datapoint from before the tiled vocab head (#181). The old untiled 32000-vocab lm_head exceeds the 16384 max matmul dimension on the A13-A15 families, so only A16+ (M5) reported. The tiled head fixes this; the older machines re-run to populate it. Until then, use **Peak fp16 GEMM (TF/s)** as the headline._ |
|
|
|
|