ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2016, Vol. 53 ›› Issue (6): 1249-1262.doi: 10.7544/issn1000-1239.2016.20148354

• 软件技术 • 上一篇    下一篇

基于CUPTI接口的典型GPU程序负载特征分析

郑祯,翟季冬,李焱,陈文光   

  1. (清华大学计算机科学与技术系 北京 100084) (z-zheng14@mails.tsinghua.edu.cn)
  • 出版日期: 2016-06-01
  • 基金资助: 
    国家自然科学基金项目(61103021);国家“八六三”高技术研究发展计划基金项目(2012AA010901)

Workload Analysis for Typical GPU Programs Using CUPTI Interface

Zheng Zhen, Zhai Jidong, Li Yan, Chen Wenguang   

  1. (Department of Computer Science and Technology, Tsinghua University, Beijing 100084)
  • Online: 2016-06-01

摘要: 基于图形处理器(graphics processing unit, GPU)加速设备的高性能计算机已经成为目前高性能计算领域的一个重要发展趋势.然而,在当前的GPU设备上开发高效的并行程序仍然是一件非常复杂的事情.针对这一问题,1)总结了影响GPU程序性能的5类关键性能指标;2)采用NVIDIA公司提供的CUPTI底层接口,设计并实现了一套GPU程序性能分析工具集,该工具集可以有效地分析GPU程序的性能行为;3)采用该工具集对著名的GPU评测程序集Rodinia中的17个程序和一个真实应用程序进行了负载特征分析.总结出常见性能瓶颈的典型原因,并给出一些开发高效GPU程序的建议.

关键词: 图形处理器, 负载特征分析, Rodinia, 硬件计数器, 性能指标

Abstract: GPU-based high performance computers have become an important trend in the area of high performance computing. However, developing efficient parallel programs on current GPU devices is very complex because of the complex memory hierarchy and thread hierarchy. To address this problem, we summarize five kinds of key metrics that reflect the performance of programs according to the hardware and software architecture. Then we design and implement a performance analysis tool based on underlying CUPTI interfaces provided by NVIDIA, which can collect key metrics automatically without modifying the source code. The tool can analyze the performance behaviors of GPU programs effectively with very little impact on the execution of programs. Finally, we analyze 17 programs in Rodinia benchmark, which is a famous benchmark for GPU programs, and a real application using our tool. By analyzing the value of key metrics, we find the performance bottlenecks of each program and map the bottlenecks back to source code. These analysis results can be used to guide the optimization of CUDA programs and GPU architecture. Result shows that most bottlenecks come from inefficient memory access, and include unreasonable global memory and shared memory access pattern, and low concurrency for these programs. We summarize the common reasons for typical performance bottlenecks and give some high-level suggestions for developing efficient GPU programs.

Key words: graphics processing unit (GPU), workload analysis, Rodinia, performance counter, performance metric

中图分类号: