计算机工程与应用 ›› 2016, Vol. 52 ›› Issue (7): 17-23.

• 理论与研发 • 上一篇    下一篇

面向异构众核的CUDA程序二进制翻译

李  男,庞建民,单  征   

  1. 解放军信息工程大学,郑州 450002
  • 出版日期:2016-04-01 发布日期:2016-04-19

Binary translation of CUDA program for heterogeneous and many-core architecture

LI Nan, PANG Jianmin, SHAN Zheng   

  1. PLA Information Engineering University, Zhengzhou 450002, China
  • Online:2016-04-01 Published:2016-04-19

摘要: 通过二进制翻译手段将CUDA程序移植到其他异构众核处理器平台特别是国产处理器平台,对扩展CUDA程序应用范围,发挥目标平台的众核优势以及支持民族产业都具有现实意义。设计了CUDA程序的二进制翻译框架,从CUDA程序可执行代码入手,采用“分而治之”的手段,将主机端代码和设备端代码分别翻译。重点介绍了移植过程中几个关键问题的解决,包括设备端代码的提取,计算模型的映射,存储模型的映射,栅栏同步和指令翻译问题。通过实验验证了系统功能的正确性。

null

关键词: CUDA程序, 二进制翻译, 计算模型映射, 存储模型映射, 栅栏同步, 指令翻译

Abstract: Porting CUDA program to other heterogeneous and many-core architectures by the way of binary translation is significant for extending the range of the CUDA application, leveraging the advantage of many cores and supporting national industry. Begin with the CUDA executive code, a translation framework is designed in which the host-end codes and device-end codes are translated separately based on a method of Divide-and-Conquer. In the course of migration, the solutions of several key problems are described emphatically such as the extraction of device-end codes, the mapping of computing model and storage model, synchronization barrier and instruction translation. The experimental results validate the system’s correctness.

Key words: CUDA program, binary translation, computing model mapping, storage model mapping, synchronization barrier, instruction translation