Journal of Computer Applications ›› 2017, Vol. 37 ›› Issue (8): 2200-2208.DOI: 10.11772/j.issn.1001-9081.2017.08.2200

Previous Articles     Next Articles

Method for exploiting function level vectorization on simple instruction multiple data extensions

LI Yingying1,2, GAO Wei1,2, GAO Yuchen1,2, ZHAI Shengwei3, LI Pengyuan4   

  1. 1. State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou Henan 450002, China;
    2. PLA Information Engineering University, Zhengzhou Henan 450002, China;
    3. The 27 th Research Institute, China Electronics Technology Group Corporation, Zhengzhou Henan 450047, China;
    4. Beijing Institute of Tracking and Telecommunications Technology, Beijing 100094, China
  • Received:2016-12-29 Revised:2017-03-21 Online:2017-08-10 Published:2017-08-12

发掘函数级单指令多数据向量化的方法

李颖颖1,2, 高伟1,2, 高雨辰1,2, 翟胜伟3, 李朋远4   

  1. 1. 数学工程与先进计算国家重点实验室, 郑州 450002;
    2. 信息工程大学, 郑州 450002;
    3. 中国电子科技集团公司 第二十七研究所, 郑州 450047;
    4. 北京跟踪与通信技术研究所, 北京 100094
  • 通讯作者: 高雨辰
  • 作者简介:李颖颖(1984-),女,河南郑州人,讲师,硕士,主要研究方向:先进编译技术;高伟(1988-),男,黑龙江齐齐哈尔人,博士研究生,主要研究方向:高性能计算、先进编译技术;高雨辰(1988-),男,河南郑州人,硕士研究生,主要研究方向:先进编译技术;翟胜伟(1982-),男,河南郑州人,工程师,硕士,主要研究方向:先进计算;李朋远(1989-),男,河南焦作人,研究员,硕士,主要研究方向:高性能计算。

Abstract: Currently, two vectorization methods which exploit Simple Instruction Multiple Data (SIMD) parallelism are loop-based method and Superword Level Parallel (SLP) method. Focusing on the problem that the current compiler cannot realize function level vectorization, a method of function level vectorization based on static single assignment was proposed. Firstly, the variable properties of program were analysed, and then a set of compiling directives including SIMD function annotations, uniform clauses, linear clauses were used to realize function level vectorization. Finally, the vectorized code was optimized by using the variable attribute result. Some test cases from the field of multimedia and image processing were selected to test the function and performance of the proposed function level vectorization on Sunway platform. Compared with the scalar program execution results, the execution of the program after the function level vectorization is more efficient. The experimental results show that the function level vectorization can achieve the same effect of task level parallelism, which is instructive to realize the automatic function level vectorization.

Key words: Single Instruction Multiple Data (SIMD) extension, parallelism, function level vectorization, compiler directive, static single assignment

摘要: 当前面向单指令多数据(SIMD)扩展部件的两类向量化方法分别是循环级向量化方法和超字级并行(SLP)方法。针对当前编译器不能实现函数级向量化的问题,提出一种基于静态单赋值的函数级向量化方法。该方法首先分析程序的变量属性,然后利用一组包括向量函数子句、一致子句、线性子句等编译指示子句指导编译器实现函数级向量化,最后利用变量属性结果对向量化代码进行了优化。从多媒体和图像处理领域选择部分测试用例对所提的函数级向量化的功能和性能在国产申威平台上进行测试,与程序串行执行相比,采用函数级向量化后程序的执行效率更高。实验结果表明函数级向量化可以取得类似任务级并行的加速效果,该方法可以指导自动函数级向量化的实现。

关键词: 单指令多数据扩展, 并行性, 函数级向量化, 编译指示, 静态单赋值

CLC Number: