电子学报 ›› 2020, Vol. 48 ›› Issue (4): 654-661.DOI: 10.3969/j.issn.0372-2112.2020.04.006

• 学术论文 • 上一篇    下一篇

面向CUDA程序的性能预测框架

曲海成, 于思淼, 刘万军, 王鑫源   

  1. 辽宁工程技术大学软件学院, 辽宁葫芦岛 125105
  • 收稿日期:2018-11-26 修回日期:2019-11-12 出版日期:2020-04-25
    • 通讯作者:
    • 于思淼
    • 作者简介:
    • 曲海成 男,1981年9月出生,山东烟台人.副教授、硕士生导师、CCF会员、IEEE会员.2005年、2008年和2016年分别在青岛理工大学、辽宁工程技术大学和哈尔滨工业大学获学士学位、硕士学位和博士学位.现为辽宁工程技术大学软件学院软件工程系主任,主要研究方向为遥感影像高性能计算,数字图像处理等.E-mail:quhaicheng@lntu.edu.cn;刘万军 男,1959年10月出生,辽宁北镇人.教授、博士生导师、CCF高级会员.1991年在辽宁工程技术大学获硕士学位,主要从事数字图像处理,运动目标检测与跟踪等研究工作.Email:liuwanjun@lntu.edu.cn
    • 基金资助:
    • 国家自然科学基金青年基金 (No.41701479); 辽宁省自然科学基金 (No.20180550529); 辽宁省教育厅科学研究基础研究 (No.LJ2019JL010)

Performance Prediction Framework for CUDA Programs

QU Hai-cheng, YU Si-miao, LIU Wan-jun, WANG Xin-yuan   

  1. College of Software, Liaoning Technical University, Huludao, Liaoning 125105, China
  • Received:2018-11-26 Revised:2019-11-12 Online:2020-04-25 Published:2020-04-25

摘要: 为对CUDA并行程序内核性能进行分析和预测,从而指导并行程序设计及性能优化,提出一种性能预测框架.1)从GPU编程模型和设备架构细节入手,以线程束为研究单位,通过整合与GPU程序用时密切相关的软硬件基本特征,定义了并行空间闲置度、流处理器线程束负载、并行效应因子等高层次性能相关特征.2)基于上述特征,框架针对线程负载均衡型GPU程序,评估内核函数在不同问题规模以及执行配置下的执行时间.3)依据性能评估原理提出了内核函数执行配置参数的优化策略.验证实验结果表明,该框架在两种典型情境下对现有程序性能的平均预测准确率分别达到89%和94%,客观归纳了高层次特征与程序性能间的相关关系,且能定性分析并行算法性能水平.

关键词: 性能预测, 线程束, 设备并行空间, 并行效应, 性能特征, 执行配置参数优化

Abstract: In order to analyze and predict the performance of CUDA program kernel and guide parallel program design and performance optimization,a performance prediction framework is proposed.This paper starts with the GPU programming model and hardware architecture details,with warp as the research unit.By integrating hardware and software factors closely related to GPU program time,high-level performance-related features such as device parallel space idle degree (DPSID),number of streaming multiprocessor warp (NSMW) are defined.Based on the above features,a framework for evaluating the execution time of kernel functions under different problem sizes and execution configurations is built for thread load balancing GPU programs.The principle of optimizing configuration parameters of kernel function execution is put forward to guide optimizing program performance.The experimental results show that the average prediction accuracy of the framework is 89% and 94% in the two scenarios,respectively.

Key words: performance prediction, thread warp, device active warps, parallel effect, performance features, execution configuration optimization

中图分类号: