arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2601.13345cs.SEcs.PF
收藏

FlipFlop: 一种基于静态分析的GPU内核能量优化框架

FlipFlop: A Static Analysis-based Energy Optimization Framework for GPU Kernels

Dalhousie University(达尔豪斯大学);IBM Research(IBM研究院)

Saurabhsingh Rajput, Alexander Brandt, Vadim Elisseev, Tushar Sharma

AI总结:

FlipFlop通过静态分析预测GPU内核能耗,推荐帕累托最优线程块配置,实现高达79%的能耗节省和106%的吞吐量提升。

摘要:

人工智能(AI)应用,如大语言模型,主要由图形处理器单元(GPU)驱动和执行。这些GPU程序(内核)消耗大量能量,但软件开发者往往缺乏优化能耗所需的硬件专业知识和即兴知识。我们提出了FlipFlop框架,该框架利用静态代码分析来预测能耗,并推荐考虑功率消耗和执行时间的帕累托最优线程块配置。我们的框架不需要运行时执行,分析PTX代码,这是一种为CUDA启用GPU的低级指令集。它在多种GPU和内核上得到验证,包括多头注意力、卷积和矩阵乘法。FlipFlop在识别局部最优节能配置方面达到83%的准确率,同时通过减少优化搜索空间93.4%来最小化开发者的努力。对于多头注意力内核,它相对于NVIDIA的占用启发式方法实现了高达79%的能耗节省和106%的吞吐量提升。通过将静态分析与实时监控相结合,并提供可解释的优化指导,FlipFlop使开发者能够创建可持续的、高性能的GPU软件,从而最小化环境和计算成本。

英文摘要:

Artificial Intelligence (AI) applications, such as Large Language Models, are primarily driven and executed by Graphics Processing Units (GPUs). These GPU programs (kernels) consume substantial amounts of energy, yet software developers often lack the hardware expertise and ad hoc knowledge required to optimize for power efficiency. We propose FlipFlop, a framework using static code analysis to predict energy consumption and recommend Pareto-optimal thread block configurations considering both power consumption and execution time. Our framework requires no runtime execution and analyzes PTX code, a low-level instruction set for CUDA-enabled GPUs. It is validated across a diverse set of GPUs and kernels, including multi-head attention, convolution, and matrix multiplication. FlipFlop achieves 83% accuracy in identifying locally optimal energy-efficient configurations, while also minimizing developer effort by reducing the optimization search space by 93.4%. For multi-head attention kernels, it yields up to 79% energy savings and 106% throughput gains relative to NVIDIA's occupancy heuristic. By integrating static analysis with real-time monitoring and providing explainable optimization guidance, FlipFlop empowers developers to create sustainable, high-performance GPU software which minimizes environmental and computational costs.

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

↑