Computer Engineering and Applications ›› 2016, Vol. 52 ›› Issue (21): 30-35.

Previous Articles     Next Articles

Asymptotic fitting optimization technology for source-to-source compile system on CPU-GPU architecture

WEI Hongchang, ZHU Zhengdong, DONG Xiaoshe, NING Jie   

  1. School of Electronic & Information Engineering, Xi’an Jiaotong University, Xi’an 710049, China
  • Online:2016-11-01 Published:2016-11-17

面向CPU-GPU源到源编译系统的渐近拟合优化方法

魏洪昌,朱正东,董小社,宁  洁   

  1. 西安交通大学 电子与信息工程学院,西安 710049

Abstract: Aiming at addressing the problem of the inadequate performance optimization after developing and porting of application on CPU-GPU heterogeneous parallel system, a new approach for CPU-GPU system is proposed, which combines asymptotic fitting optimization with source-to-source compiling technique. This approach can translate C code that inserts directives into CUDA code, and profile the generated code several times. Besides, the approach can realize the source-to-source compiling and optimization of the generated code automatically, and a prototype system based on the approach is realized in this paper as well. Functionality and performance evaluations of the prototype show that the generated CUDA code is functionally equivalent to the original C code while its improvement in performance is significant. When compared with CUDA benchmark, the performance of the generated CUDA code is obviously better than codes generated by other source-to-source compiling technique.

Key words: source-to-source compile, Compute Unified Device Architecture(CUDA), profiling, asymptotic fitting optimization

摘要: 针对CPU-GPU异构并行系统应用开发移植后优化不充分问题,提出了一种渐近拟合优化与源到源编译相结合的方法,该方法能够对插入了制导语句的C语言程序转换为CUDA语言后的程序进行多次剖分,根据源程序特性和硬件信息自动完成源到源编译与优化,并基于该方法实现了原型系统。通过在不同环境中的该原型系统在功能和性能方面进行的测试表明,由系统生成的CUDA目标程序与C源程序在功能上一致,性能上却有了大幅度提高,通过与CUDA基准测试程序相比表明,该目标程序在性能上明显优于其他源到源编译转换生成的程序。

关键词: 源到源编译, 统一计算架构(CUDA), 剖分, 渐近拟合优化