[论文解读] Benchmarking OpenCL, OpenACC, OpenMP, and CUDA: programming productivity, performance, and energy consumption
本论文利用 SPEC Accel 和 Rodinia 基准测试套件,在 Intel Xeon Phi 和 GPU 系统上对 OpenMP、OpenACC、OpenCL 和 CUDA 进行了编程生产力、性能和能效的基准测试。研究发现,OpenMP 所需的代码修改最少(仅 4.86% 的代码行),而 OpenCL 所需的开发工作量显著高于 OpenACC 和 CUDA,但在 Ida 等 GPU 加速系统上表现出更优的性能。
Many modern parallel computing systems are heterogeneous at their node level. Such nodes may comprise general purpose CPUs and accelerators (such as, GPU, or Intel Xeon Phi) that provide high performance with suitable energy-consumption characteristics. However, exploiting the available performance of heterogeneous architectures may be challenging. There are various parallel programming frameworks (such as, OpenMP, OpenCL, OpenACC, CUDA) and selecting the one that is suitable for a target context is not straightforward. In this paper, we study empirically the characteristics of OpenMP, OpenACC, OpenCL, and CUDA with respect to programming productivity, performance, and energy. To evaluate the programming productivity we use our homegrown tool CodeStat, which enables us to determine the percentage of code lines that was required to parallelize the code using a specific framework. We use our tool x-MeterPU to evaluate the energy consumption and the performance. Experiments are conducted using the industry-standard SPEC benchmark suite and the Rodinia benchmark suite for accelerated computing on heterogeneous systems that combine Intel Xeon E5 Processors with a GPU accelerator or an Intel Xeon Phi co-processor.
研究动机与目标
- 评估并比较四种主流异构编程框架(OpenMP、OpenACC、OpenCL 和 CUDA)在编程生产力、性能和能耗方面的表现。
- 解决在特定目标系统和应用背景下选择最合适框架的挑战。
- 量化使用每种框架进行代码并行化所需的人力工作量,特别是代码行修改的关联程度。
- 在配备 GPU 和 Intel Xeon Phi 加速器的真实异构系统上,测量并比较实际性能与能耗表现。
- 提供实证数据,以指导基于生产力、性能与能效权衡的框架选择决策。
提出的方法
- 使用自定义工具 CodeStat 测量并行化过程中代码行的修改比例,作为编程生产力的代理指标。
- 开发了 x-MeterPU,作为 MeterPU 的扩展,用于测量配备 GPU 和 Intel Xeon Phi 加速器的系统上的性能与能耗。
- 在两套异构系统上开展实验:Ida(配备 GTX Titan X GPU)和 Emil(配备两颗 Intel Xeon Phi E5 处理器)。
- 采用工业标准基准测试套件:SPEC Accel 和 Rodinia,涵盖多种计算密集型内核。
- 收集所有框架与基准测试的执行时间与能耗数据,以支持跨框架比较。
- 通过代码修改率、执行时间与能效等多维度指标分析结果,得出对比性见解。
实验结果
研究问题
- RQ1在 OpenMP、OpenACC、OpenCL 和 CUDA 框架之间,以代码修改工作量衡量的编程生产力有何差异?
- RQ2在 GPU 和 Xeon Phi 加速系统上,OpenCL、OpenACC、OpenMP 和 CUDA 之间的性能差异如何?
- RQ3在执行相同基准测试时,四种框架的能耗表现有何不同?
- RQ4人为因素在并行编程任务中对代码修改率的影响程度如何?
- RQ5在异构计算中,哪种框架在生产力、性能与能效之间提供了最佳权衡?
主要发现
- OpenMP 所需的代码修改最少,仅需修改 4.86% 的代码行,是本研究中生产力最高的框架。
- OpenCL 需要修改 9.07% 的代码行,显著高于 OpenACC,表明其生产力成本更高。
- 在 Rodinia 基准测试套件中,OpenCL 并行化所需的工作量约为 CUDA 的两倍。
- 在 GPU 加速系统 Ida 上,OpenCL 在 LBM 和 MRI-Q 内核上的执行时间优于 OpenACC,而对 Stencil 内核的结果则与 OpenACC 相当。
- 在 Ida 系统上,OpenMP、OpenCL 和 CUDA 的性能与能耗表现相近,表明其效率特征相似。
- 人为因素显著影响代码修改率,表明开发者在不同框架上的工作量存在明显差异。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。