SIP:通过随机指令扰动自动调优GPU原生调度
SIP: Autotuning GPU Native Schedules via Stochastic Instruction Perturbation
AI总结:
本文提出SIP方法,通过定义GPU原生指令调度搜索空间并应用随机搜索进行自动优化,有效提升了LLM训练和推理中CUDA内核的极致性能与吞吐量。
摘要:
自出现以来,大型语言模型(LLM)已成为一种重要的工作负载。然而,由于具有数十亿个参数并使用海量数据进行训练,它们的计算成本也很高昂。因此,近期的研究开发了专用的CUDA内核用于LLM训练和推理,而不是依赖编译器生成的内核,以尽可能充分利用硬件资源。在这项工作中,我们探索了GPU原生指令优化的可能性,以进一步将CUDA内核推向极致性能。与以往的工作不同,我们采用了一种自动优化方法,通过定义可能的GPU原生指令调度搜索空间,然后应用随机搜索来执行优化。实验表明,SIP能够通过自动发现更好的GPU原生指令调度来进一步提升CUDA内核吞吐量,并且优化后的调度经过了1000万个测试样本的测试。
英文摘要:
Large language models (LLMs) have become a significant workload since their appearance. However, they are also computationally expensive as they have billions of parameters and are trained with massive amounts of data. Thus, recent works have developed dedicated CUDA kernels for LLM training and inference instead of relying on compilergenerated ones, so that hardware resources are as fully utilized as possible. In this work, we explore the possibility of GPU native instruction optimization to further push the CUDA kernels to extreme performance. Contrary to prior works, we adopt an automatic optimization approach by defining a search space of possible GPU native instruction schedules, and then we apply stochastic search to perform optimization. Experiments show that SIP can further improve CUDA kernel throughput by automatically discovering better GPU native instruction schedules and the optimized schedules are tested by 10 million test samples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。