[论文解读] Hierarchical Roofline Analysis: How to Collect Data using Performance Tools on Intel CPUs and NVIDIA GPUs
本文提出了一种无需依赖特定工具的综合方法,利用 Intel Advisor、LIKWID、nvprof 和 Nsight Compute 等底层性能分析工具,在 Intel CPU 和 NVIDIA GPU 上收集分层 Roofline 性能数据。该方法可详细分析内存层次结构的使用情况与算术强度,覆盖多个缓存层级,为研究人员和开发者提供了一种灵活的替代方案,可实现跨不同工具和 GPU/CPU 架构的一致、可复现的结果,替代厂商集成的工具。
This paper surveys a range of methods to collect necessary performance data on Intel CPUs and NVIDIA GPUs for hierarchical Roofline analysis. As of mid-2020, two vendor performance tools, Intel Advisor and NVIDIA Nsight Compute, have integrated Roofline analysis into their supported feature set. This paper fills the gap for when these tools are not available, or when users would like a more customized workflow for certain analysis. Specifically, we will discuss how to use Intel Advisor, RRZE LIKWID, Intel SDE and Intel Amplifier on Intel architectures, and nvprof, Nsight Compute metrics, and Nsight Compute section files on NVIDIA architectures. These tools will be used to collect information for as many memory/cache levels in the memory hierarchy as possible in order to provide insights into application's data reuse and cache locality characteristics.
研究动机与目标
- 为分层性能分析提供一种灵活、可定制的替代方案,以替代 Intel Advisor 和 NVIDIA Nsight Compute 等厂商集成的 Roofline 工具。
- 实现在 Intel CPU 和 NVIDIA GPU 上对多个内存层次结构(L1、L2、HBM 等)的详细数据采集。
- 支持无法访问商业工具或需要对性能数据采集工作流进行细粒度控制的研究人员和开发者。
- 在代表性硬件(Knights Landing 和 V100 GPU)上,验证不同性能工具和指标集之间 Roofline 结果的一致性与准确性。
提出的方法
- 在 Intel Knights Landing CPU 上,使用 Intel Advisor、RRZE LIKWID、Intel SDE 和 Intel VTune 收集性能数据。
- 在 NVIDIA V100 GPU 上,使用 nvprof、Nsight Compute 2019 和 Nsight Compute 2020,并结合自定义指标集,采集底层性能计数器数据。
- 利用硬件性能计数器,收集算术强度(FLOPs/Byte)、GFLOP/s 吞吐量以及 L1、L2 和 HBM 层级的内存流量指标。
- 将性能计数器映射到 Roofline 模型组件:通过指令执行指标获取 FLOP 计数,通过内存访问计数器获取数据移动量。
- 使用 BerkeleyGW 代码库中的微型应用(General Plasmon Pole)在真实 HPC 工作负载上验证数据采集工作流。
- 在不同工具之间标准化指标集(例如 sm__cycles_elapsed、l1tex__t_sectors_pipe_lsu_mem_global_op_ld),以确保 Roofline 结果在跨工具间的一致性。
实验结果
研究问题
- RQ1当厂商工具不可用时,是否可以使用开源和底层性能工具有效执行分层 Roofline 分析?
- RQ2在相同 GPU 工作负载上,使用不同性能工具(如 nvprof 与 Nsight Compute 2019 和 Nsight Compute 2020)时,Roofline 结果的一致性如何?
- RQ3LIKWID 和 Intel SDE 等工具在多级缓存分析中,相比全功能工具,其数据准确性与粒度如何?
- RQ4Nsight Compute 2020 中的简化指标集是否能产生与早期版本更复杂指标集相当的结果?
- RQ5在真实 HPC 内核中,性能特征(算术强度、GFLOP/s)在内存层次结构的不同层级(L1、L2、HBM)之间如何变化?
主要发现
- 分层 Roofline 模型可成功通过多种性能工具(包括非 Intel Advisor 和 NVIDIA Nsight Compute 的工具)实现,为不同部署环境提供了灵活性。
- 在 nvprof、Nsight Compute 2019 和 Nsight Compute 2020 之间观察到一致的 Roofline 结果,算术强度和 GFLOP/s 吞吐量仅有微小差异。
- LIKWID 实现了低开销的内存层次结构特征分析,但因缺乏对向量长度和指令类型区分,可能存在一定不准确性。
- Intel SDE 和 VTune 提供了详细的仿真和采样数据,但其性能分析开销高于 LIKWID。
- NVIDIA 的 Nsight Compute 2020 引入了简化的指标集,其结果与更复杂的指标集相当,使该工具更容易集成到现有工作流中。
- 微型应用(GPP)在 V100 GPU 上的 L1、L2 和 HBM 层级表现出相似的算术强度和性能特征,表明存在较强的数据重用和高效的内存访问模式。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。