NVIDIA V100 GPU上实现3.7 TFLOP/s的8个步骤:Roofline分析和其他技巧
8 Steps to 3.7 TFLOP/s on NVIDIA V100 GPU: Roofline Analysis and Other Tricks
摘要:
性能优化可能是一项艰巨的任务,特别是当硬件架构变得越来越复杂时。本文从材料科学代码BerkeleyGW的内核,并演示了一些性能分析和优化技术。尽管面临着寄存器使用率高、占用率低、数据访问模式复杂以及存在多条长延迟指令等挑战,但我们通过8个优化步骤,在NVIDIA V100 GPU上实现了3.7 TFLOP/s的双精度性能。这是标称频率1312 MHz时理论峰值6.7 TFLOP/s的55%,以及基于我们的58% FMA比5.3 TFLOP/s的更定制峰值的70%。一系列用于分析OpenACC内核并优化其性能的技术,包括使用分层Roofline性能模型和性能工具Nsight Compute。该内核具有许多高性能计算(HPC)应用中常见的计算特性,预计将对HPC开发人员和计算科学家的普通受众非常有帮助,因为他们希望在NVIDIA GPU上获得更高的性能。
英文摘要:
Performance optimization can be a daunting task especially as the hardware architecture becomes more and more complex. This paper takes a kernel from the Materials Science code BerkeleyGW, and demonstrates a few performance analysis and optimization techniques. Despite challenges such as high register usage, low occupancy, complex data access patterns, and the existence of several long-latency instructions, we have achieved 3.7 TFLOP/s of double-precision performance on an NVIDIA V100 GPU, with 8 optimization steps. This is 55% of the theoretical peak, 6.7 TFLOP/s, at nominal frequency 1312 MHz, and 70% of the more customized peak based on our 58% FMA ratio, 5.3 TFLOP/s. An array of techniques used to analyze this OpenACC kernel and optimize its performance are shown, including the use of hierarchical Roofline performance model and the performance tool Nsight Compute. This kernel exhibits computational characteristics that are commonly seen in many high-performance computing (HPC) applications, and are expected to be very helpful to a general audience of HPC developers and computational scientists, as they pursue more performance on NVIDIA GPUs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。