Random projection can reduce the dimension of data while capturing its structure and is a fundamental tool for machine learning, signal processing, and information retrieval, which deal with a large amount of data today. RandNLA (Randomized Numerical Linear Algebra) leverages random projection to reduce the computational complexity of low-rank decomposition of tensors and solve least-square problems. While the computation of the random projection is a simple matrix multiplication, its asymptotic computational complexity is typically larger than other operations in a RandNLA algorithm. Therefore, various studies propose methods for reducing its computational complexity. We propose a fast mixed-precision random projection method on NVIDIA GPUs using Tensor Cores for single-precision tensors. We exploit the fact that the random matrix requires less precision, and develop a highly optimized matrix multiplication between FP32 and FP16 matrices -- SHGEMM (Single and Half-precision GEMM) -- on Tensor Cores, where the random matrix is stored in FP16. Our method can compute Randomized SVD 1.28 times faster and Random projection high order SVD 1.75 times faster than baseline single-precision implementations while maintaining accuracy.
翻译:随机投影能够在保持数据结构的同时降低数据维度,是当前处理大量数据的机器学习、信号处理和信息检索领域的基础工具。RandNLA(随机化数值线性代数)利用随机投影降低张量低秩分解的计算复杂度并解决最小二乘问题。尽管随机投影的计算本质是简单的矩阵乘法,但其渐进计算复杂度通常高于RandNLA算法中的其他操作。因此,已有多种研究提出降低其计算复杂度的方法。我们提出一种利用NVIDIA GPU张量核心对单精度张量执行快速混合精度随机投影的方法。通过利用随机矩阵对精度要求较低的特性,我们开发了张量核心上FP32与FP16矩阵间高度优化的矩阵乘法——SHGEMM(单半精度通用矩阵乘法),其中随机矩阵以FP16格式存储。与基线单精度实现相比,我们的方法在保持精度的前提下,可将随机化奇异值分解计算速度提升1.28倍,将随机化高阶奇异值分解计算速度提升1.75倍。