Metal-Sci: Een wetenschappelijke rekenbenchmark voor evolutionaire LLM-kernelzoektocht op Apple Silicon
Metal-Sci: A Scientific Compute Benchmark for Evolutionary LLM Kernel Search on Apple Silicon
May 10, 2026
Auteurs: Víctor Gallego
cs.AI
Samenvatting
We presenteren Metal-Sci, een benchmark met 10 taken voor wetenschappelijke Apple Silicon Metal-rekenkernels die zes optimalisatiegebieden beslaan (stencils, alle-paren in n-lichamen-problemen, multi-veld-Boltzmann, buurlijst-moleculaire-dynamica, multi-kernel-PDE, FFT). Elke taak bevat een CPU-referentie, een roofline-verankerde fitnessfunctie en een uitgehouden generalisatiegrootte. We koppelen de benchmark aan een lichtgewicht harness voor automatisch kernel-onderzoek die elke kandidaat tijdens runtime compileert, deze scoort tegen de roofline over meerdere groottes, en gestructureerde compileer- en per-grootte-correctheidsdiagnostiek terugvoert naar een bevroren LLM die een (1+1) evolutionaire lus aanstuurt. We rapporteren gematchte single-model-sweeps van Claude Opus 4.7, Gemini 3.1 Pro en GPT 5.5 op M1 Pro: zelfversnellingen binnen de verdeling variëren van 1,00x tot 10,7x. Naast ruwe versnelling is onze centrale methodologische claim structureel: de vaste gate-scorefunctie Φ_T (eenmalig geëvalueerd aan het einde van de run op een configuratie die de agent tijdens de zoektocht nooit ziet) fungeert als een goedkope mechanische toezichtsprimitieve op deze automatische zoeklus, en vangt bijvoorbeeld een Opus-sjabloon <uint D> HMC-win dat verkeerde samples retourneert op ongeziene dimensies, en een GPT-FFT3D-beste dat binnen de verdeling wint met 2,95x versnelling maar instort tot 0,23x op een uitgehouden 256³-kubus – een stille regressie die de score binnen de verdeling alleen niet kan zien. Code op https://github.com/vicgalle/metal-sci-kernels.
English
We present Metal-Sci, a 10-task benchmark of scientific Apple Silicon Metal compute kernels spanning six optimization regimes (stencils, all-pairs in n-body problems, multi-field Boltzmann, neighbor-list molecular dynamics, multi-kernel PDE, FFT). Each task ships a CPU reference, a roofline-anchored fitness function, and a held-out generalization size. We pair the benchmark with a lightweight harness for automatic kernel search that runtime-compiles each candidate, scores it against the roofline across multiple sizes, and feeds structured compile and per-size correctness diagnostics back to a frozen LLM driving a (1{+}1) evolutionary loop. We report matched single-model sweeps of Claude Opus 4.7, Gemini 3.1 Pro, and GPT 5.5 on M1 Pro: in-distribution self-speedups span 1.00times to 10.7times. Beyond raw speedup, our central methodological claim is structural: the held-out gate scoring function Φ_T (evaluated once at end-of-run on a configuration the agent never sees during search) functions as a cheap mechanical oversight primitive on this automatic search loop, catching e.g. an Opus template <uint D> HMC win that returns wrong samples at unseen dimensions, and a GPT FFT3D best that wins in-distribution at 2.95times speedup but collapses to 0.23times on a 256^3 held-out cube, a silent regression that the in-distribution score alone cannot see. Code at https://github.com/vicgalle/metal-sci-kernels