arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.04104cs.LG
收藏

ModelBlaster:通过跨模型、内核和硬件后端的学习增强智能体缩小性能差距

ModelBlaster: Closing the Performance Gap through Learning-Augmented Agents Across Models, Kernels and Hardware Backends

NVIDIA(英伟达);University of California, Berkeley(加州大学伯克利分校)

Shengjun Kris Dong, Dima Nikiforov, Sahil Modi, Sana Damani, Edward C Lin, Siva Kumar Sastry Hari, Christos Kozyrakis

AI总结:

ModelBlaster是MAIC-RL框架,通过跨异构加速器的学习增强智能体优化数据并行内核与模型,在多基准测试中较PyTorch等工具实现显著性能提升,支持多种硬件后端。

摘要:

在不同硬件架构上优化加速器代码难度较大。机器学习编译器会在预定义的调度和微内核空间中搜索,而大型语言模型(LLM)引导的优化则可探索替代算法、算子分解及硬件特定技术。不过,现有LLM智能体通常仅针对单一编程接口、工具链或加速器系列,聚焦内核级优化而未涉及模型级变换,且跨硬件目标的经验复用能力有限。本文提出ModelBlaster,这是一种用于在异构SIMD和SIMT加速器上优化数据并行内核与完整模型的记忆增强上下文强化学习(MAIC-RL)框架。其可变策略是一个持久知识库,由演员-评论家文本梯度下降(AC-TGD)在推理时更新,该知识库将性能状态映射到动作、结果和约束,支持跨内核、模型和硬件目标的经验复用。模型级优化器利用内核级知识为完整模型决策提供依据。相同的优化循环和知识架构支持NVIDIA GPU上的CUDA、高通GPU上的OpenCL以及RISC-V向量核上的RVV内部函数,仅降低和测量层针对每个目标特定。与PyTorch相比,ModelBlaster在B200 GPU上的KernelBench 1、2、3级实现几何平均加速比1.85倍、5.58倍和5.18倍,在SOL-ExecBench 1和2级实现1.69倍加速;在高通Adreno GPU上,相比供应商SDK实现5.8倍加速,相比Apache TVM实现1.7倍加速;在RISC-V向量核上,相比带有XNNPACK的ExecuTorch在70个KernelBench问题上实现2.7倍加速。

英文摘要:

Optimizing accelerator code across hardware architectures is difficult. ML compilers search predefined spaces of schedules and micro-kernels, while LLM-guided optimization can explore alternative algorithms, operator decompositions, and hardware-specific techniques. However, existing LLM agents typically target a single programming interface, toolchain, or accelerator family, focus on kernel-level optimization without model-level transforms, and offer limited reuse of experience across hardware targets. We present ModelBlaster, a Memory-Augmented In-Context Reinforcement Learning (MAIC-RL) framework for optimizing data-parallel kernels and whole models across heterogeneous SIMD and SIMT accelerators. Its mutable policy is a persistent knowledge base updated at inference time by Actor-Critic Textual Gradient Descent (AC-TGD). The knowledge base maps performance states to actions, outcomes, and constraints, enabling experience reuse across kernels, models, and hardware targets. A model-level optimizer uses kernel-level knowledge to inform whole-model decisions. The same optimization loop and knowledge schema support CUDA on NVIDIA GPUs, OpenCL on Qualcomm GPUs, and RVV intrinsics on RISC-V vector cores, with only lowering and measurement layers specific to each target. Compared with PyTorch, ModelBlaster achieves geometric-mean speedups of 1.85x, 5.58x, and 5.18x on KernelBench Levels 1, 2, and 3, and 1.69x on SOL-ExecBench Levels 1 and 2 on a B200 GPU. On Qualcomm Adreno GPUs, it achieves 5.8x over the vendor SDK and 1.7x over Apache TVM; on RISC-V vector cores, it achieves 2.7x over ExecuTorch with XNNPACK across 70 KernelBench problems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑