传统并行编程模型和框架不能有效利用和发挥GPU异构并行系统特点,应用开发难度大,性能优化困难,文中采用混合编程模型思想,建立了一种以协处理器为中心的GPU计算核心与CPU控制相融合的多任务流编程模型.模型将并行任务与CUDA流相结合,利用系统硬件并行性特点实现程序任务级和数据级并行;采用任务间消息通信和任务内数据共享通信方式,既保证对传统并行应用的继承又降低了不同存储空间给应用开发带来的复杂性和难度.基于该编程模型实现了一个运行时支持系统原型,测试结果表明可保证高效的数据通信,且能充分利用系统计算能力,提高了应用程序运行效率.
The traditional parallel programing models or frameworks cannot efficiently make use of the new features of the GPU based on heterogeneous parallel system, and the developing and optimization of applications are difficult in this environment. To address this problem, this paper proposed a coprocessor-centered multi task-stream programing model. The model mixes GPU computing kernel and CPU controlling work together. The parallel tasks are coupled with CUDA streams and hardware parallel is used to realize task-level and data-level parallelization of program executions. The model adopts message passing communication between tasks and data sharing within single task, and can maintain the existed parallel application features as well as decrease the complexity and difficulty of programing that different memories bring about. A prototypical runtime system for the model is built up and tested. The experimental results indicate that the communications can be carried out efficiently and the computing abilities of system are fully exploited to improve the performances of application programs.