bair.berkeley.edu·2026/07/29
为什么重要 面向 Apple Silicon 的 AI kernel 移植提供自动搜索与优化迁移思路,降低 CUDA 生态经验复用成本。
图 1:CUDA-to-MLX 优化转换图。CUDA 优化知识可以被转换为架构原生的 MLX 策略,而不是逐指令复制。
我们正面对计算的新纪元。硬件正在快速变化——不仅是更快的 GPU,还有来自不同供应商、越来越多芯片,每种芯片都有自己的架构,并且通常针对特定 AI 工作负载进行定制。
软件变化同样迅速,AI 编码工具现在能在几分钟内生成几年前需要数月努力才能完成的内容。随着计算如今如此以 AI 为中心,GPU kernels 是其成功的关键组成部分。
这些是在 GPU 内部运行的低层程序,编写高效 kernels 远非显而易见——需要多年专业知识才能做好。将内核从一个供应商的硬件转移到另一个供应商的硬件更加困难,通常意味着从零开始重新发现同样的优化。
Figure 1: CUDA-to-MLX optimization translation map. CUDA optimization knowledge can be translated into architecture-native MLX strategies rather than copied instruction-for-instruction.
We face a new epoch in computing.
Hardware is changing rapidly — not just faster GPUs, but a growing range of chips from different vendors, each with its own architecture and often tailored to specific AI workloads.
Software is changing just as fast, and AI coding tools now generate in minutes what took months of effort a few years ago.
With so much of computing now centered on AI, GPU kernels are a crucial component of its success.
These are the low-level programs that run inside the GPU, and writing efficient ones is far from obvious — it takes years of expertise to get right. Transferring a kernel from o…