Performance modeling, a pivotal domain in program cost analysis, currently relies on manually crafted models constrained by various program and hardware limitations, especially in the intricate landscape of GPGPU. Meanwhile, Large Language Models (LLMs) have demonstrated their effectiveness in addressing diverse programming challenges. Our work establishes a connection between LLMs and performance modeling, employing the LLM as a performance estimator. Through experimental exploration with carefully designed large-scale OpenCL datasets, we highlight the potential capability as well as the main difficulties of using LLMs in handling performance modeling tasks for OpenCL device source programs. As the first study for this line of work, our LLM-based performance model achieves a mean absolute percentage error of $24.25\%$ for a large-scale generated validation set. On a set of publicly available OpenCL programs, our model achieves a mean absolute percentage error of $46.1\%$.
翻译:性能建模作为程序成本分析的关键领域,当前依赖于受限于各类程序与硬件约束的人工构建模型,尤其在复杂的通用图形处理器(GPGPU)场景中更为突出。与此同时,大型语言模型(LLMs)已在解决多样化编程挑战方面展现出显著效能。本研究构建了LLMs与性能建模之间的桥梁,将LLM作为性能评估器加以运用。通过精心设计的大规模OpenCL数据集进行实验探索,我们揭示了LLMs在处理OpenCL设备源程序性能建模任务时的潜在能力与主要挑战。作为该研究路线的首次尝试,我们基于LLM的性能模型在大型生成验证集上实现了$24.25\%$的平均绝对百分比误差,在公开可用的OpenCL程序集上则达到$46.1\%$的平均绝对百分比误差。