GPU上具备在线容错能力的高性能GEMM的剖析
Anatomy of High-Performance GEMM with Online Fault Tolerance on GPUs
AI总结:
针对大规模计算平台下GEMM的可靠性问题,本文提出GPU上的多层级容错高性能GEMM设计,采用内核融合降延迟、模板化自动代码生成适配多矩阵形状,实验显示其性能优于cuBLAS且容错开销极低。
摘要:
通用矩阵乘法(General Matrix Multiplication, GEMM)是机器学习、科学计算等各类应用中的核心算法,高效的GEMM实现对这些系统的性能至关重要。研究人员通常借助大型计算平台追求更快的性能,但这类系统规模的扩大也引发了对硬件和软件可靠性的担忧。本文提出了一种适用于GPU、基于算法的容错高性能GEMM设计。\n我们在线程、线程束(warp)和线程块层级设计了GEMM的容错机制,还提供了一套基准GEMM实现,其性能与业界最先进的专有cuBLAS GEMM相当甚至更优。我们提出了一种内核融合策略,将容错带来的内存延迟与原始GEMM计算重叠,从而抵消这部分延迟影响。为了适配广泛的输入矩阵形状并降低开发成本,我们提出了基于模板的方法,可自动生成容错和非容错GEMM的实现代码。\n我们在NVIDIA Tesla T4和A100服务器GPU上开展了评估。实验结果表明,我们的基准GEMM性能与闭源的cuBLAS相当或更优。即便每分钟注入数百个错误,容错GEMM相较于cuBLAS仅产生极小的开销(平均8.89%)。对于不规则形状的输入,代码生成器生成的内核实现了显著的性能提升:容错GEMM加速比达160%~183.5%,非容错GEMM加速比达148.55%~165.12%,性能最高超出cuBLAS 41.40%。
英文摘要:
General Matrix Multiplication (GEMM) is a crucial algorithm for various applications such as machine learning and scientific computing, and an efficient GEMM implementation is essential for the performance of these systems. While researchers often strive for faster performance by using large compute platforms, the increased scale of these systems can raise concerns about hardware and software reliability. In this paper, we present a design for a high-performance GEMM with algorithm-based fault tolerance for use on GPUs. We describe fault-tolerant designs for GEMM at the thread, warp, and threadblock levels, and also provide a baseline GEMM implementation that is competitive with or faster than the state-of-the-art, proprietary cuBLAS GEMM. We present a kernel fusion strategy to overlap and mitigate the memory latency due to fault tolerance with the original GEMM computation. To support a wide range of input matrix shapes and reduce development costs, we present a template-based approach for automatic code generation for both fault-tolerant and non-fault-tolerant GEMM implementations. We evaluate our work on NVIDIA Tesla T4 and A100 server GPUs. Experimental results demonstrate that our baseline GEMM presents comparable or superior performance compared to the closed-source cuBLAS. The fault-tolerant GEMM incurs only a minimal overhead (8.89\% on average) compared to cuBLAS even with hundreds of errors injected per minute. For irregularly shaped inputs, the code generator-generated kernels show remarkable speedups of $160\% \sim 183.5\%$ and $148.55\% \sim 165.12\%$ for fault-tolerant and non-fault-tolerant GEMMs, outperforming cuBLAS by up to $41.40\%$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。