- K-Search uses evolutionary AI to translate CUDA kernel optimization strategies for Apple Silicon.
- The framework achieves 97% of FlashAttention performance on Apple hardware.
- Researchers reported a 20x speed improvement for Mamba state space model prefill tasks.
- This technology reduces the reliance on manual kernel tuning when porting AI models across different hardware architectures.
Bridging the Gap: How K-Search Transports Decades of CUDA Expertise to Apple Silicon
IBM Research and Berkeley Sky Lab unveil a translation layer that unlocks near-native performance for AI models on Apple's proprietary hardware.

Key Takeaways
The landscape of artificial intelligence is currently defined by a high-stakes race between hardware diversity and software efficiency. As AI workloads become increasingly specific, hardware vendors are pivoting toward bespoke architectures. However, this fragmentation has created a significant bottleneck: the chasm between the mature, highly optimized CUDA ecosystem and the emerging, yet under-optimized, architectures like Apple Silicon.
For years, the CUDA ecosystem—NVIDIA's proprietary parallel computing platform—has served as the gold standard for AI performance. It represents decades of human ingenuity, containing hand-tuned kernels for attention mechanisms, state space models (SSMs), and neural network primitives. These kernels are the result of thousands of engineering hours, fine-tuned to extract every possible drop of performance from NVIDIA hardware.
When developers attempt to transition these high-performance operations to newer platforms like Apple Silicon, they are often forced to start from scratch. Because hardware architectures differ fundamentally in memory hierarchy, thread management, and instruction sets, a simple code port is rarely sufficient.
This is where K-Search, an evolutionary kernel search framework originally developed at Berkeley Sky Lab, enters the picture. Recently, a team of researchers from IBM Research and Berkeley has expanded K-Search to bridge this divide, introducing a specialized translation layer that moves beyond simple code copying. Instead of attempting to translate CUDA instructions directly, the framework translates the optimization strategy itself, allowing Apple Silicon’s Metal framework to leverage the architectural patterns perfected in the CUDA era.
The core innovation of K-Search lies in its evolutionary approach to kernel generation. Rather than relying solely on human manual tuning, the system uses an AI-driven search process to explore the vast space of possible kernel configurations.
By treating the optimization process as a search problem, the framework can identify which techniques—such as tiling, fusion, or memory access patterns—work best for a specific target architecture. When applied to the CUDA-to-MLX (Apple's Machine Learning framework) translation, the system analyzes the performance characteristics of an existing CUDA kernel and effectively 're-tunes' those logic patterns for the unique strengths and constraints of the Apple Silicon chip.
The results of this cross-platform optimization are striking. According to the research team, the implementation has achieved:
- FlashAttention Parity: The framework reached 97% of the performance levels seen in traditional FlashAttention implementations, a critical milestone for transformer-based models.
- Massive SSM Acceleration: Mamba state space models (SSMs) saw a 20x improvement in prefill speed, demonstrating the efficiency of the framework in handling modern, non-transformer architectures.
- Knowledge Transfer: By bypassing the need for manual porting, the framework effectively compresses years of engineering research into a automated pipeline.
As we move toward a future where AI runs locally on personal devices rather than exclusively in massive data centers, the efficiency of Apple Silicon becomes paramount. The ability to automatically 'port' the intelligence embedded in NVIDIA-centric kernels to other platforms democratizes AI development. It ensures that developers are not locked into a single hardware ecosystem and that innovation on one platform can rapidly accelerate development on others.
This development marks a shift in how we view software-hardware co-design. By utilizing evolutionary AI to optimize kernels, we are essentially using AI to build better AI, creating a self-improving loop that could eventually render manual kernel tuning a relic of the past. As this technology matures, we can expect to see even more specialized hardware accelerators benefiting from the vast library of kernel knowledge that the industry has spent the last decade building.
Enjoying this article?
Get the daily AI briefing sent straight to your inbox.
Frequently Asked Questions
What is K-Search?
K-Search is an evolutionary kernel search framework developed by Berkeley Sky Lab and IBM that uses AI to automatically optimize GPU kernels for different hardware architectures.
How does K-Search improve Apple Silicon performance?
It translates the optimization logic used in CUDA kernels into strategies compatible with Apple's Metal and MLX frameworks, allowing Apple chips to run AI models with performance comparable to NVIDIA hardware.
Does K-Search replace manual coding?
It significantly reduces the need for manual porting and low-level tuning, allowing developers to transfer years of expert-level kernel optimizations to new platforms automatically.
Comments
0Related articles

HiRO-ACEv2: Revolutionizing Weather Forecasting with AI Precision
New AI weather modeling from the Allen Institute for AI promises to democratize climate data by cutting computational costs while maintaining extreme precision.

TII Unveils Falcon ASR: A New Era in Open-Source Speech Recognition
TII has launched Falcon ASR, a state-of-the-art open-source speech recognition model designed to set new benchmarks in accuracy and efficiency.

How the AI Community is Building the Models That Big Tech Won't
When the perfect AI model doesn't exist, the modern developer doesn't wait—they build it. Here is how the open-source movement is reshaping the AI landscape.