
From CUDA to MLX: How K-Search Brings Decades of Kernel Expertise to Apple Silicon
IBM Research extends K-Search, an evolutionary GPU kernel optimization framework from UC Berkeley Sky Lab that uses an LLM to iteratively propose, compile, and benchmark candidate kernels, with a new MLX backend for Apple Silicon and a structured CUDA-to-MLX translation layer. The translation layer maps CUDA primitives (shared memory, warp reductions, syncthreads) to Metal/MLX equivalents with hardware-specific constraints, letting the search reuse NVIDIA kernel expertise instead of rediscovering optimizations from scratch. Using Gemini 3.5 Pro Preview as both reasoner and code generator, the approach reaches 0.97x the speed of Apple's native MLX attention kernel and delivers up to 20x faster prefill than the community mlx-lm Mamba SSM implementation.
inference, research· 2026-07-29T09:00:00+00:00

