From CUDA to MLX: How K-Search Brings Decades of Kernel Expertise to Apple Silicon
TL;DR - K-Search transfers CUDA optimization knowledge into architecture-native MLX kernels for Apple Silicon. It approaches native MLX attention performance and delivers up to 20Ă— faster Mamba prefill than the community mlx-lm implementation.
- Uses an LLM-guided evolutionary loop to generate, compile, benchmark, and refine kernels on real hardware.
- A structured translation layer adapts CUDA optimization strategies rather than copying instructions directly.
- Hardware specifications constrain generation and reduce invalid or inefficient kernel candidates.
- The approach could extend CUDA expertise to other emerging accelerator ecosystems.