FlexVec: auto-vectorization for irregular loops

FlexVec: auto-vectorization for irregular loops
复制标题

FlexVec:不规则循环的自动矢量化

DOI:
10.1145/2908080.2908111
复制
发表时间:
2016
期刊:
Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Youfeng Wu
Youfeng Wu
中科院分区:
--
文献类型:
--
作者:
Sara S. Baghsorkhi;N. Vasudevan;Youfeng Wu

文献摘要

被引文献

相似文献

传统的矢量化技术构建了一个具有距离和方向信息的依赖图,以确定循环是否可矢量化。由于矢量化会使跨迭代的指令执行,因此,在牢固连接组件(SCC)的一般指令中,除非可以使用标量扩展或私有化等技术消除SCC,否则不可矢量化。因此,传统的矢量化技术的有限限制,其具有动态交叉依赖性或依赖性周期内交织的复杂控制流的有效处理循环的能力受到限制。当潜在的依赖性不经常发生时,最终结果将在SIMD硬件的利用下。在本文中,我们提出了FlexVec架构,将新的矢量指令与新颖的代码生成技术相结合,以动态调整受运行时发生的交叉识别依赖性影响的循环语句的矢量长度。我们已经设计并实施了FlexVec的新ISA作为最近发布的AVX-512 ISA的扩展。我们已经评估了通过flexVec矢量化为11 C/C ++规格2006基准和7个具有AVX-512矢量化的实际应用,从而评估了性能改进。我们表明,FlexVec矢量化技术对于Spec 2006的Geomean速度为9%,对于7种实际应用,Geomean速度为11%。
Traditional vectorization techniques build a dependence graph with distance and direction information to determine whether a loop is vectorizable. Since vectorization reorders the execution of instructions across iterations, in general instructions involved in a strongly connected component (SCC) are deemed not vectorizable unless the SCC can be eliminated using techniques such as scalar expansion or privatization. Therefore, traditional vectorization techniques are limited in their ability to efficiently handle loops with dynamic cross-iteration dependencies or complex control flow interweaved within the dependence cycles. When potential dependencies do not occur very often, the end-result is under utilization of the SIMD hardware. In this paper, we propose FlexVec architecture that combines new vector instructions with novel code generation techniques to dynamically adjusts vector length for loop statements affected by cross-iteration dependencies that happen at runtime. We have designed and implemented FlexVec's new ISA as extensions to the recently released AVX-512 ISA. We have evaluated the performance improvements enabled by FlexVec vectorization for 11 C/C++ SPEC 2006 benchmarks and 7 real applications with AVX-512 vectorization as baseline. We show that FlexVec vectorization technique produces a Geomean speedup of 9% for SPEC 2006 and a Geomean speedup of 11% for 7 real applications.