arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.11389cs.DC
收藏

NVIDIA PTX码上的混洗综合符号模拟器

A Symbolic Emulator for Shuffle Synthesis on the NVIDIA PTX Code

Kazuaki Matsumura, Simon Garcia De Gonzalo, Antonio J. Peña

摘要:

各种应用程序通过自动化工具利用GPU,这些工具试图自动利用GPU并行架构的可用性能。基于指令的编程模型(如OpenACC)就是这样一种方法,它只需将代码注释粘附到代码循环即可轻松实现并行计算。然而,这种抽象模型通常会阻止程序员进行额外的低级优化以利用GPU的高级架构特性,因为实际生成的计算对应用程序开发人员是隐藏的。本文描述并实现了一种新的灵活的优化技术,通过插入一个代码仿真器阶段的尾端编译管道。我们的工具通过替换动态信息来模拟使用符号分析生成的代码,从而允许应用进一步的低级代码优化。我们实现了我们的工具,以支持CUDA和OpenACC指令作为编译管道的前端,从而实现了以前不可能实现的OpenACC的低级GPU优化。我们展示了我们的工具的能力,通过自动化扭曲级洗牌指令,即使是先进的GPU程序员很难使用。最后,通过基准测试套件和复杂的应用程序代码评估我们的工具,我们提供了一个详细的研究,以评估在四代GPU架构中shuffle指令的好处。

英文摘要:

Various kinds of applications take advantage of GPUs through automation tools that attempt to automatically exploit the available performance of the GPU's parallel architecture. Directive-based programming models, such as OpenACC, are one such method that easily enables parallel computing by just adhering code annotations to code loops. Such abstract models, however, often prevent programmers from making additional low-level optimizations to take advantage of the advanced architectural features of GPUs because the actual generated computation is hidden from the application developer. This paper describes and implements a novel flexible optimization technique that operates by inserting a code emulator phase to the tail-end of the compilation pipeline. Our tool emulates the generated code using symbolic analysis by substituting dynamic information and thus allowing for further low-level code optimizations to be applied. We implement our tool to support both CUDA and OpenACC directives as the frontend of the compilation pipeline, thus enabling low-level GPU optimizations for OpenACC that were not previously possible. We demonstrate the capabilities of our tool by automating warp-level shuffle instructions that are difficult to use by even advanced GPU programmers. Lastly, evaluating our tool with a benchmark suite and complex application code, we provide a detailed study to assess the benefits of shuffle instructions across four generations of GPU architectures.

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

↑