Large matrix multiplication is a cornerstone of modern machine learning workloads, yet traditional approaches suffer from cubic computational complexity (e.g., $\mathcal{O}(n^3)$ for a matrix of size $n\times n$). We present Low-Rank GEMM, a novel approach that leverages low-rank matrix approximations to achieve sub-quadratic complexity while maintaining hardware-accelerated performance through FP8 precision and intelligent kernel selection. On a NVIDIA RTX 4090, our implementation achieves up to 378 TFLOPS on matrices up to $N=20480$, providing 75\% memory savings and $7.8\times$ speedup over PyTorch FP32 for large matrices. The system automatically adapts to hardware capabilities, selecting optimal decomposition methods (SVD, randomized SVD) and precision levels based on matrix characteristics and available accelerators. Comprehensive benchmarking on NVIDIA RTX 4090 demonstrates that Low-Rank GEMM becomes the fastest approach for matrices $N\geq10240$, surpassing traditional cuBLAS implementations through memory bandwidth optimization rather than computational shortcuts.


翻译:大规模矩阵乘法是现代机器学习工作负载的基石,然而传统方法受限于立方级计算复杂度(例如,对于尺寸为$n\\times n$的矩阵,复杂度为$\\mathcal{O}(n^3)$)。本文提出低秩GEMM,这是一种利用低秩矩阵近似实现亚二次复杂度,同时通过FP8精度与智能内核选择保持硬件加速性能的新方法。在NVIDIA RTX 4090上,我们的实现在尺寸高达$N=20480$的矩阵上实现了最高378 TFLOPS的性能,相比PyTorch FP32在大规模矩阵上节省75%内存并带来$7.8\\times$的加速。该系统能自适应硬件能力,根据矩阵特性与可用加速器选择最优分解方法(SVD、随机化SVD)与精度级别。在NVIDIA RTX 4090上的全面基准测试表明,对于$N\\geq10240$的矩阵,低秩GEMM通过内存带宽优化而非计算捷径,成为超越传统cuBLAS实现的最快方法。

0
下载
关闭预览

相关内容

NeurIPS 2021 | 寻找用于变分布泛化的隐式因果因子
专知会员服务
17+阅读 · 2021年12月7日
专知会员服务
25+阅读 · 2021年7月31日
专知会员服务
33+阅读 · 2021年6月24日
图节点嵌入(Node Embeddings)概述,9页pdf
专知
15+阅读 · 2020年8月22日
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
CNN 反向传播算法推导
统计学习与视觉计算组
30+阅读 · 2017年12月29日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
NeurIPS 2021 | 寻找用于变分布泛化的隐式因果因子
专知会员服务
17+阅读 · 2021年12月7日
专知会员服务
25+阅读 · 2021年7月31日
专知会员服务
33+阅读 · 2021年6月24日
相关资讯
图节点嵌入(Node Embeddings)概述,9页pdf
专知
15+阅读 · 2020年8月22日
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
CNN 反向传播算法推导
统计学习与视觉计算组
30+阅读 · 2017年12月29日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员