arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.01018cs.DCcs.PL
收藏

Autovesk:使用图变换从非结构化静态内核自动生成向量化代码

Autovesk: Automatic vectorized code generation from unstructured static kernels using graph transformations

Hayfa Tayeb, Ludovic Paillat, Berenger Bramas

AI总结:

本文提出Autovesk方法,通过图变换和启发式策略,将操作可静态推断的混乱数据访问标量代码自动转换为向量化代码,并在Intel AVX-512和ARM SVE上验证了其有效性。

摘要:

充分利用现代 CPU 架构日益提升的性能,必须利用其 SIMD 能力。为利用此特性,二进制可执行文件必须由开发者或自动向量化工具显式地进行向量化。因此,编译研究社区已创建多种策略,将标量代码转换为向量化实现。然而,大多数方法聚焦于常规算法(如仿射循环),这类算法仅需少量数据变换即可向量化。本文提出一种新方法,只要标量代码的操作可以被静态推断,即可自动对具有混乱数据访问的标量代码进行向量化。我们描述了该方法如何使用不同启发式策略将标量指令图转换为向量化指令图,旨在减少指令的数量或成本。最后,我们使用 Intel AVX-512 和 ARM SVE 在多种计算内核上验证了该方法的优越性。

英文摘要:

Leveraging the SIMD capability of modern CPU architectures is mandatory to take full benefit of their increasing performance. To exploit this feature, binary executables must be explicitly vectorized by the developers or an automatic vectorization tool. This why the compilation research community has created several strategies to transform a scalar code into a vectorized implementation. However, the majority of the approaches focus on regular algorithms, such as affine loops, that can be vectorized with few data transformations. In this paper, we present a new approach that allow automatically vectorizing scalar codes with chaotic data accesses as long as their operations can be statically inferred. We describe how our method transforms a graph of scalar instructions into a vectorized one using different heuristics with the aim of reducing the number or cost of the instructions. Finally, we demonstrate the interest of our approach on various computational kernels using Intel AVX-512 and ARM SVE.

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

↑