节点文献

自动向量化中的收益评估技术研究

Research on Benefit Evaluation Techniques in Automatic Vectorization

【作者】 张媛媛

【导师】 赵荣彩;

【作者基本信息】 解放军信息工程大学 , 计算机软件与理论, 2011, 硕士

【摘要】 当前,以音/视频、图形图像等为主要服务内容的多媒体产业迅猛发展,使得通用微处理器体系结构广泛支持多媒体扩展技术。多媒体扩展主要利用多媒体程序中广泛存在的SIMD并行性以获得性能加速,加速主要体现在多媒体扩展指令集对小数据类型运算和多媒体程序中常见但比较复杂运算的SIMD支持上。近些年来在进行高性能计算和嵌入式DSP处理器中也都大量引入SIMD机制,用以加速和提升处理性能。因此,这些计算技术和应用的发展促进了编译技术中自动向量化技术的研究和发展。然而,在实际的研究和技术实现中,代码向量化必然也要引入一定的开销,只有在向量化后带来的收益大于其开销时进行向量化才有意义。在什么情况下的向量化才能获得应有的收益?本文的核心内容就是围绕这一关键问题,分析、探究向量化的收益评估模型、设计方法和实现技术,以准确、量化的形式支持编译的优化。首先,论文针对SIMD自动向量化过程中出现的代码性能损失问题,对SIMD收益评估进行定义,阐述收益评估涉及到的WHIRL中间表示,确定收益代价评估模型,选定最优PACK的生成方案。其次,在传统向量化的基础上,本文提出了一种基于SLP向量化方法的向量化基本收益评估模型,以及内存访问在连续不对齐模式下局部数据重组的开销评估方法,并基于此实现了SIMD向量化性能的优化。明确了向量化性能的几大影响因素,即:内存的连续访问、内存的对齐访问、拼接指令以及寄存器压力等。另外,循环变换可对向量化程序的性能产生影响。本文探讨了不同循环变换类型对应的多面体表示,研究了多面体表示下的向量化性能度量模型。基于原SIMD编译优化框架,本文提出了新的指导循环变换的优化流程,给出搜索最优方案的优化算法(OVAS),并详细阐述了在非连续内存访问模式(non-unit stride access)下收益代价模型。在存储访问模型的基础上提出一种不对齐访问模式的代价评估方法,给出了基于多面体表示的SIMD向量化代价模型。最后,进行了技术实现和对实现系统的充分测试和分析,并对今后的工作做了进一步的展望。

【Abstract】 With the rapid development of multimedia industry including audio/video and image etc recently, the general micro-processor architecture widely supports the multimedia extension technology. The multimedia extension mainly takes advantage of the widely existence of SIMD parallelism in program to achieve performance acceleration. The acceleration is implemented by SIMD instruction sets support for small data type operations and classical complex operations. In recent years, SIMD mechanism is being largely introduced in High Performance Computing and embedded DSP processors, accelerating and promoting the performance. So with these development of computing technology and applications, research on automatic vectorization in compilation technology has been facilitated and developed. However, in realistic research and technique implementation, code vectorization is not always prior to the original scalar code, by bringing in some overhead and is worth doing only when vectorization benefits is greater than costs. In which case can vectorization be profitable? The key content of the thesis encloses this key problem, analyses and explores benefit analysis model in automatic vectorization as well as the methods and implementation technique in order to support compiler optimization accurately and quantitatively.In the thesis, firstly, in order to resolve the performance loss in SIMD auto-vectorization, we define the SIMD profitability evaluation, present the WHIRL intermediate representation which involve in profitability evaluation, establish the profit-cost evaluation model and then find the best pack generation solution.Secondly, he thesis propose the SLP vectorization basic profitability evaluation model based on traditional vectorization as well as the cost evaluation method in the contiguous and misalignment mode, influence vectorization performance including continuous memory access, alignment memory access, splice instruction and register spill etc.Thirdly, loop transformation can have impact on vectorization performance. The thesis discusses different polyhedral representation of loop transformation, research vectorization performance metrics model under polyhedral representation. Based on the current SIMD compiler optimization framework, the thesis brings out the novel optimization procedure to guide loop transformation, present optimal-vectorization-alternatives-search(OVAS) algorithm, clarifies profit-cost model in non-unit stride access, proposes cost evaluation method under misalignment access based on memory access model and establish the SIMD vectorization cost model based on polyhedron representation.At last, we implement the technique mentioned above, make tests on targeted machine, analyze the results and make a further expectation on relating work.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络