Saved in:
Bibliographic Details
Main Authors: Han, Yuxuan, Guo, Meng-Hao, Liu, Zhengning, Chen, Wenguang, Hu, Shi-Min
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2603.07169
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912951443652608
author Han, Yuxuan
Guo, Meng-Hao
Liu, Zhengning
Chen, Wenguang
Hu, Shi-Min
author_facet Han, Yuxuan
Guo, Meng-Hao
Liu, Zhengning
Chen, Wenguang
Hu, Shi-Min
contents Optimizing GPU kernels manually is a challenging and time-consuming task. With the rapid development of LLMs, automated GPU kernel optimization is gradually becoming a tangible reality. However, current LLM-driven automated optimization methods narrowly focus on machine learning applications, such as PyTorch operator optimization, while overlooking broader domains like sparse matrix operations in scientific computing. Extending to these broader applications brings new challenges for the benchmark and algorithm. Therefore, developing a general-purpose automated kernel optimization method becomes our primary focus. In this paper, we address the absence of systematic evaluation for multi-scenario settings by introducing MSKernelBench, which spans multiple scenarios, including fundamental algebraic operations, common LLM kernels, sparse matrix operators, and scientific computing routines, each supporting both FP32 and BF16 precision. Building on this benchmark, we introduce CUDAMaster, a multi-agent, hardware-aware system for kernel optimization that leverages profiling information and automatically constructs the full compilation and execution toolchain. Experimental results demonstrate that CUDAMaster achieves significant speedups across most operators, outperforming Astra by about 35%. In several cases, its performance matches or surpasses that of highly optimized, closed-source libraries such as cuBLAS. A demo showcasing the original and optimized code for each operator is available at https://hanyx2021.github.io/MSKernelBenchDemo/.
format Preprint
id arxiv_https___arxiv_org_abs_2603_07169
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Making LLMs Optimize Multi-Scenario CUDA Kernels Like Experts
Han, Yuxuan
Guo, Meng-Hao
Liu, Zhengning
Chen, Wenguang
Hu, Shi-Min
Machine Learning
Optimizing GPU kernels manually is a challenging and time-consuming task. With the rapid development of LLMs, automated GPU kernel optimization is gradually becoming a tangible reality. However, current LLM-driven automated optimization methods narrowly focus on machine learning applications, such as PyTorch operator optimization, while overlooking broader domains like sparse matrix operations in scientific computing. Extending to these broader applications brings new challenges for the benchmark and algorithm. Therefore, developing a general-purpose automated kernel optimization method becomes our primary focus. In this paper, we address the absence of systematic evaluation for multi-scenario settings by introducing MSKernelBench, which spans multiple scenarios, including fundamental algebraic operations, common LLM kernels, sparse matrix operators, and scientific computing routines, each supporting both FP32 and BF16 precision. Building on this benchmark, we introduce CUDAMaster, a multi-agent, hardware-aware system for kernel optimization that leverages profiling information and automatically constructs the full compilation and execution toolchain. Experimental results demonstrate that CUDAMaster achieves significant speedups across most operators, outperforming Astra by about 35%. In several cases, its performance matches or surpasses that of highly optimized, closed-source libraries such as cuBLAS. A demo showcasing the original and optimized code for each operator is available at https://hanyx2021.github.io/MSKernelBenchDemo/.
title Making LLMs Optimize Multi-Scenario CUDA Kernels Like Experts
topic Machine Learning
url https://arxiv.org/abs/2603.07169