一句话:提出统一库 HiWayLib,解决 CPU-GPU 流水线通信中的结束检测、队列竞争与跨设备传输问题,显著加速。
针对 CPU-GPU 异构系统中流水线应用的通信效率问题,本文深入分析了流水线阶段间通信的三大挑战:流水线处理结束检测缓慢且易错、GPU 上队列竞争激烈,以及跨设备数据移动繁琐。作者分别提出对应解决方案并集成为统一库 HiWayLib,支持位于 CPU 与 GPU 不同部分的流水线阶段间高效通信。实验表明,HiWayLib 能显著提升异构流水线通信效率;在真实应用中,相较于当前最优实现取得 1.22~2.13 倍加速,且仅需少量额外编程工作。
Pipeline is a parallel computing model underpinning a class of important applications running on CPU-GPU heterogeneous systems. A critical aspect for the efficiency of such applications is the support of communications among pipeline stages that may reside on CPU and different parts of a GPU. Existing libraries of concurrent data structures do not meet the needs, due to the massive parallelism on GPU and the complexities in CPU-GPU memory and connections. This work gives an in-depth study on the communication problem. It identifies three key issues, namely, slow and error-prone detection of the end of pipeline processing, intensive queue contentions on GPU, and cumbersome inter-device data movements. This work offers solutions to each of the issues, and integrates all together to form a unified library named HiWayLib. Experiments show that HiWayLib significantly boosts the efficiency of pipeline communications in CPU-GPU heterogeneous applications. For real-world applications, HiWayLib produces 1.22~2.13× speedups over the state-of-art implementations with little extra programming effort required.