arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2001.05585cs.DC
收藏

GPU张量核用于快速算术归约

GPU Tensor Cores for fast Arithmetic Reductions

Cristóbal A. Navarro, Roberto Carrasco, Ricardo J. Barrientos, Javier A. Riquelme, Raimundo Vega

摘要:

这项工作提出了一种GPU张量核心的方法,编码的算术减少$n$号码作为一组链式$m \times m$矩阵乘累加(MMA)的操作并行执行的GPU张量核心。所提出的链式张量核方法的渐近运行时间为$T(n)=5 log_{m^2}{n}$,其加速比为$S=\dfrac{4}{5} log_{2}{m^2}$,优于经典的$O(n \log n)$并行约简算法.实验结果表明,该方法比传统的GPU约简方法具有更快的$\sim 3.2 \times$速度,并且由于每个$R$ MMA链的子结果在全部约简为最终32位结果之前都保持为32位浮点值,因此保持了数值精度。链式MMA设计允许灵活配置线程块; 32或128个线程的小线程块仍然可以使用每个块的$R=4,5$ MMA链来实现最大性能,而大线程块使用$R=1$效果最佳。在这项工作中获得的结果表明,张量核确实可以为非机器学习应用提供显着的性能改进,例如算术约简,这是研究许多科学现象的集成工具。

英文摘要:

This work proposes a GPU tensor core approach that encodes the arithmetic reduction of $n$ numbers as a set of chained $m \times m$ matrix multiply accumulate (MMA) operations executed in parallel by GPU tensor cores. The asymptotic running time of the proposed chained tensor core approach is $T(n)=5 log_{m^2}{n}$ and its speedup is $S=\dfrac{4}{5} log_{2}{m^2}$ over the classic $O(n \log n)$ parallel reduction algorithm. Experimental performance results show that the proposed reduction method is $\sim 3.2 \times$ faster than a conventional GPU reduction implementation, and preserves the numerical precision because the sub-results of each chain of $R$ MMAs is kept as a 32-bit floating point value, before being all reduced into as a final 32-bit result. The chained MMA design allows a flexible configuration of thread-blocks; small thread-blocks of 32 or 128 threads can still achieve maximum performance using a chain of $R=4,5$ MMAs per block, while large thread-blocks work best with $R=1$. The results obtained in this work show that tensor cores can indeed provide a significant performance improvement to non-Machine Learning applications such as the arithmetic reduction, which is an integration tool for studying many scientific phenomena.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑