From CUDA to MLX: How K-Search Brings Decades of Kernel Expertise to Apple Silicon
IBM Research has extended the K-Search evolutionary kernel search framework with a CUDA‑to‑MLX translation layer, allowing expert CUDA kernel optimizations to be automatically mapped onto Apple Silicon via the MLX stack. The approach recovers up to 97% of FlashAttention performance and delivers roughly a 20× speed‑up for Mamba state‑space model prefill, demonstrating that decades of kernel knowledge can be transferred across architectures with minimal manual effort.
- K-Search’s translation layer bridges CUDA kernels to MLX, enabling native Metal‑based optimizations on Apple Silicon.
- The translated kernels achieve near‑state‑of‑the‑art performance, reaching 97% of FlashAttention speed.
- Mamba SSM prefill runs about 20 times faster, showcasing the practical impact of cross‑architecture kernel transfer.
