Berkeley Artificial Intelligence Research reposted this
What are the odds that an LLM can write a highly optimized GPU kernel—with no team of GPU experts manually tuning it? What are the odds that you can take the optimization knowledge accumulated in CUDA kernels and transfer it to a very different architecture such as Apple Silicon? Ask most GPU engineers whether an LLM can do this on its own, and the answer would be: basically zero. Together with University of California, Berkeley Sky Lab, we have been building on K-Search—its AI-driven evolutionary kernel-search framework—and extending it to leverage optimization knowledge accumulated in CUDA kernels when targeting entirely different architectures and programming environments. On Apple Silicon, our evolved attention kernel reaches approximately 97% of the performance of Apple’s state-of-the-art native MLX attention kernel. Our evolved Mamba SSM kernel also delivers approximately 20× faster prefill performance than the community MLX-LM implementation. These kernels were generated without manual tuning by GPU experts. What made this work was not simply asking an LLM to write GPU code, but using K-Search to apply fine-grained optimizations and iteratively evolve kernels on the target hardware. Apple Silicon is where we started, and we plan to support more hardware architectures soon. Stay tuned! The full story is now live on the BAIR—Berkeley Artificial Intelligence Research—blog. Link in my first comment. #GPU #CUDA #AppleSilicon #MLX #KernelOptimization #AI