MetalBench – Benchmark for Apple Silicon's Metal Shading Lang
MetalBench is a benchmarking tool designed for Apple Silicon's Metal Shading Language. It allows users to evaluate the performance of Metal GPU kernels against MLX reference implementations. The tool features an agent-based system that automates kernel profiling, optimization, and verification to enhance performance.
- ▪MetalBench benchmarks Apple Metal GPU kernels against MLX reference implementations.
- ▪The tool includes a closed-loop agent system for profiling and optimizing kernels.
- ▪It supports various kernel sets, including basic operations and full model blocks.
Opening excerpt (first ~120 words) tap to expand
MetalBench - Metal-based kernel benchmark, library, and closed-loop agent authoring system Benchmarking Apple Metal GPU kernels against MLX reference implementations. Modeled on KernelBench, swapping CUDA → Metal and PyTorch → MLX. While working on inference for Apple Silicon, I found an agent-based loop of kernel writing & testing against a perf/accuracy test helped a lot along the way. This repo contains the harness and code used to benchmark against baseline MLX versions. Kernels don't differ much — mostly in how threadgroups are utilized. One of the main differences was performance across the newer M-series chips.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.