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

使用深度序列模型预测最优内核调优参数

Optimal Kernel Tuning Parameter Prediction using Deep Sequence Models

National University of Sciences and Technology(国防科技大学(巴基斯坦));AMD Inc.(超威半导体公司)

Khawir Mahmood, Jehandad Khan, Hammad Afzal

AI总结:

本文将 GPU 内核调优参数预测建模为序列翻译问题,提出深度 seq2seq 架构与结合硬件约束的束搜索,在 MIOpen 卷积内核上达到超过 90% 的准确率。

摘要:

GPU 内核因其在从高性能计算到机器学习等多个领域中的用途而走到了计算的前沿。一个典型的 GPU 计算内核在典型应用中会被调用数百万次,甚至数十亿次,这使其性能变得极为关键。由于优化曲面具有未知性质,要发现全局最优解就需要进行穷举搜索,而参数组合的数量可能呈指数级增长,因此这种搜索并不可行。在本研究中,我们提出一种使用深度序列到序列模型来预测控制计算内核的最优调优参数的方法。本工作将内核参数预测视为一个序列到序列翻译问题,借用了自然语言处理(NLP)领域的模型。描述输入、输出和权重张量的参数被视为模型的输入语言,模型输出相应的内核参数。本质上,该模型将问题参数语言翻译为内核参数语言。本工作的核心贡献包括:a)提出序列到序列模型能够准确学习 GPU 计算内核的性能动态;b)提出一种新颖的网络架构,用于预测 GPU 内核的内核调优参数;c)提出一种受约束的束搜索,它结合了 GPU 硬件的物理限制以及其他专家知识,从而缩小搜索空间。所提出的算法在 MIOpen(AMD 的机器学习原语库)中的各种卷积内核上可以实现超过 90% 的准确率。因此,所提出的技术能够减少调优未见过的输入配置所需的开发时间和计算资源,从而带来更短的开发周期、更低的开发成本以及更好的用户体验。

英文摘要:

GPU kernels have come to the forefront of computing due to their utility in varied fields, from high-performance computing to machine learning. A typical GPU compute kernel is invoked millions, if not billions of times in a typical application, which makes their performance highly critical. Due to the unknown nature of the optimization surface, an exhaustive search is required to discover the global optimum, which is infeasible due to the possible exponential number of parameter combinations. In this work, we propose a methodology that uses deep sequence-to-sequence models to predict the optimal tuning parameters governing compute kernels. This work considers the prediction of kernel parameters as a sequence to the sequence translation problem, borrowing models from the Natural Language Processing (NLP) domain. Parameters describing the input, output and weight tensors are considered as the input language to the model that emits the corresponding kernel parameters. In essence, the model translates the problem parameter language to kernel parameter language. The core contributions of this work are: a) Proposing that a sequence to sequence model can accurately learn the performance dynamics of a GPU compute kernel b) A novel network architecture which predicts the kernel tuning parameters for GPU kernels, c) A constrained beam search which incorporates the physical limits of the GPU hardware as well as other expert knowledge reducing the search space. The proposed algorithm can achieve more than 90% accuracy on various convolutional kernels in MIOpen, the AMD machine learning primitives library. As a result, the proposed technique can reduce the development time and compute resources required to tune unseen input configurations, resulting in shorter development cycles, reduced development costs, and better user experience.

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

↑