Skip to content

Help map the ANE roofline across every Apple Silicon chip (2-minute run, you get credited) #137

Open

Description

@sbryngelson

We are characterizing the Apple Neural Engine's rooflines across the whole Apple Silicon line -- and we need runs from machines we do not have. If you have any Mac with an M-series chip, a short command adds your machine to the map, and you get credited by GitHub handle.

Why this matters

The ANE behaves differently across silicon generations and even across chassis of the same chip (a fanless MacBook Air throttles where a Mac mini does not). Two things we are mapping:

  • Performance rooflines -- peak fp16 compute, memory bandwidth, ridge point, perf/watt, decode throughput.
  • Numeric correctness cliffs -- the magnitudes at which fp16 math on the engine silently returns the wrong answer. These are silicon-dependent, and the collected data already shows it: the slice crop-DMA clamp at |value| > 4094 is present on M1 / M1 Max / M2 Pro but gone by M5 -- the pre-A16 -> A16 transition, now bracketed by real submissions. (Background: matmul saturates at fp16_max/2 (~32752); two transpose-fed cases return inf even below that #115, docs/cross-chip.md.)

How to submit

The tooling is live on main. From a clean checkout, pick your level:

# 1. cliffs only -- fastest, no sudo, works on battery (~2 min):
PYTHONPATH=. python3 bench/roofline_suite.py

# 2. RECOMMENDED -- cliffs + headline perf (peak GEMM, bandwidth, ridge, perf/W, decode).
#    A few minutes; prompts once for sudo to read watts (required for --perf). Battery + High Power is fine:
PYTHONPATH=. python3 bench/roofline_suite.py --perf

# then regenerate the table and open a PR with both files:
python3 bench/aggregate_rooflines.py
git add bench/results/rooflines/roofline-*.json bench/results/ROOFLINES.md

Open the PR and you are on the board. (--perf-full runs the complete paper-grade battery, ~30 min -- only needed for paper-quality reproduction, not for contributing a datapoint.)

Everything is recorded automatically: chip, model identifier, CPU/GPU cores, unified memory, macOS build, power source + Energy Mode (so a battery/High-Power run is labelled and comparable), and the exact code commit. See bench/results/rooflines/README.md. Chassis matters: the same M1 ANE sustains ~1.7x the GEMM on a 16-inch M1 Max (fans + High Power) as on a fanless 13-inch M1, and the table shows why.

You get credited -- automatically

Your GitHub handle is auto-detected from your git noreply email (GitHub's default) and shown in bench/results/ROOFLINES.md as a By @you column linking to your profile, plus a thanks line. Nothing to type. (If your git email is a generic one, pass --contributor YOUR-HANDLE.) This is a public, living cross-silicon dataset in the repo -- open to everyone regardless of the characterization paper's status.

Chips + GPU-core bins we are looking for

Each distinct chip + GPU-core count is its own datapoint: the fingerprint hashes gpu_cores, so a 14-core and a 16-core M1 Pro are separate rows even though their ANE is identical. Tick the exact config you ran (the GPU-core count prints in the run and lands in your JSON). If your GPU-core bin is not listed, or a count here is off, just comment it -- any binning is welcome. The Ultra/Max parts (Mac Studio / Mac Pro) are the biggest gaps and the highest ANE.

M1

  • M1 -- 7-core GPU
  • M1 -- 8-core GPU -- @diegobauavi (MacBook Pro 17,1)
  • M1 Pro -- 14-core GPU
  • M1 Pro -- 16-core GPU
  • M1 Max -- 24-core GPU
  • M1 Max -- 32-core GPU -- @sbryngelson (MacBook Pro 18,2, AC + High Power)
  • M1 Ultra -- 48-core GPU
  • M1 Ultra -- 64-core GPU

M2

  • M2 -- 8-core GPU
  • M2 -- 10-core GPU
  • M2 Pro -- 16-core GPU -- @axiom-of-choice (Mac mini)
  • M2 Pro -- 19-core GPU
  • M2 Max -- 30-core GPU
  • M2 Max -- 38-core GPU
  • M2 Ultra -- 60-core GPU
  • M2 Ultra -- 76-core GPU

M3

  • M3 -- 8-core GPU
  • M3 -- 10-core GPU
  • M3 Pro -- 14-core GPU
  • M3 Pro -- 18-core GPU
  • M3 Max -- 30-core GPU
  • M3 Max -- 40-core GPU
  • M3 Ultra -- 60-core GPU
  • M3 Ultra -- 80-core GPU

M4

  • M4 -- 8-core GPU
  • M4 -- 10-core GPU
  • M4 Pro -- 16-core GPU
  • M4 Pro -- 20-core GPU
  • M4 Max -- 32-core GPU
  • M4 Max -- 40-core GPU

M5

  • M5 -- 10-core GPU
  • M5 Pro -- 20-core GPU -- @sbryngelson (MacBook Pro, AC + High Power)
  • M5 Pro -- other GPU bins, and M5 Max / Ultra as they ship

Questions welcome in the comments. Thanks for helping build the map!

Activity

  1. pinned this issue on Aug 1, 2026
  2. axiom-of-choice commented on Aug 1, 2026

    @axiom-of-choice
    Contributor

    M2 Pro PR added

  3. sbryngelson commented on Aug 1, 2026

    @sbryngelson
    OwnerAuthor

    First external datapoints are landing -- thank you both. M2 Pro (Mac mini) from @axiom-of-choice (#145) and M1 (MacBook Pro 17,1) from @diegobauavi (#148). The M2 Pro run also surfaced a real --perf bug (#146, fixed in #147) and brackets the slice-saturation cliff at 4094 from the pre-A16 side. Keep them coming -- every new chip/chassis fills in the map.

  4. sbryngelson commented on Sep 15, 2026

    @sbryngelson
    OwnerAuthor

    @diegobauavi -- would you be up for a re-run on the MacBookPro17,1? Your Aug 1 submission was the
    first run of the suite anywhere, and a few things have changed under it since: the tiled vocab head
    (#181) that makes decode work on pre-A16 machines, and the roofline_analysis synthesis step, which
    wasn't in the suite yet on Aug 1 -- your headline numbers came through the raw-sweep fallback path.

    The new M1 MacBook Air datapoint from @Rayan-and-beyond (#267) shows the gap: same 16-core ANE, but
    4.33 TF/s and 5.4 GB/s against your row's 2.70 and 0.86, and 278 tok/s decode where yours is n/a.
    The Air lines up with the M1 Max, so the difference is the suite version, not the machines.

    Same command as before, from current main:

    PYTHONPATH=. python3 bench/roofline_suite.py --perf
    python3 bench/aggregate_rooflines.py

    It'll add a second run under your existing hardware hash and the table takes the latest. No rush.

  5. hyfjjjj commented on Oct 2, 2026

    @hyfjjjj
    Contributor

    M4 Pro — 20-core GPU submitted: #283 (Mac16,7, 14-core CPU / 20-core GPU, macOS 27.0.1)

  6. Jeff271828 commented on Oct 6, 2026

    @Jeff271828
    Contributor

    M2 Max 38-core GPU submitted: #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions