High-Performance Tensor-Train Primitives Using GPU Tensor Cores
Learning tensor-train (TT) structure (a.k.a matrix product state (MPS) representation) from large-scale high-dimensional data has been a common task in big data analysis, deep learning, and quantum machine learning. However, tensor-train algorithms are compute-intensive, which hinders their real-world applications. In this paper, we present high-performance tensor-train primitives using GPU tensor cores and demonstrate three applications. First, we use GPU tensor cores to optimize tensor-train primitives, including tensor contraction, singular value decomposition, and data transfer and computing. Second, we utilize the optimized primitives to accelerate tensor-train decomposition algorithms for big data analysis. Further, we propose a shard mode for high-order tensor computations on multiple GPUs. Third, we apply the optimized primitives to accelerate the tensor-train layer for compressing deep neural networks. Last, we utilize the optimized primitives to accelerate a quantum machine learning algorithm called <i>Density Matrix Renormalization Group (DMRG)</i>. In performance evaluations, our third-order TT tensor decomposition achieves up to <inline-formula><tex-math notation="LaTeX">$3.34\times$</tex-math></inline-formula> and <inline-formula><tex-math notation="LaTeX">$6.91\times$</tex-math></inline-formula> speedups over two popular libraries (namely T3F and tntorch) on an A100 GPU, respectively. The proposed sixth-order tensor-train decomposition achieves up to a speedup of <inline-formula><tex-math notation="LaTeX">$5.01\times$</tex-math></inline-formula> over T3F on multiple A100 GPUs. Our tensor-train layer for a fully connected neural network achieves a compression ratio of <inline-formula><tex-math notation="LaTeX">$65.3\times$</tex-math></inline-formula> at the cost of <inline-formula><tex-math notation="LaTeX">$0.3\%$</tex-math></inline-formula> drop in accuracy and a speedup of <inline-formula><tex-math notation="LaTeX">$1.53\times$</tex-math></inline-formula> over a PyTorch implementation on CUDA cores. The optimized <i>DMRG</i> algorithm achieves up to a speedup of <inline-formula><tex-math notation="LaTeX">$14.0\times$</tex-math></inline-formula> over TensorNetwork, indicating the potential of the optimized tensor primitives for the classical simulation of quantum machine learning algorithms.
Authors
- Jean Kossaifi (ORCID: https://orcid.org/0000-0002-4445-3429)
- Zeliang Zhang (ORCID: https://orcid.org/0000-0002-3890-5388)
- Anwar Walid (ORCID: https://orcid.org/0000-0003-1992-6068)
- Weiqin Tong (ORCID: https://orcid.org/0000-0001-8300-6376)
- Xiaodong Wang (ORCID: https://orcid.org/0000-0002-2945-9240)
- Xiao-Yang Liu (ORCID: https://orcid.org/0000-0002-9532-1709)
- Hao Hong (ORCID: https://orcid.org/0000-0002-0922-4065)
Institutions
- Shanghai University of Engineering Science (CN)
- Rensselaer Polytechnic Institute (US)
- Nvidia (United States) (US)
- Huazhong University of Science and Technology (CN)
- Columbia University (US)
Publication Details
- Journal
- IEEE Transactions on Computers
- Published
- 2024-08-12
- DOI
- https://doi.org/10.1109/tc.2024.3441831
- Citations
- 2
- Primary Topic
- Tensor decomposition and applications
- Type
- article
- Field-Weighted Citation Impact
- 0.65
Funders
- Science and Technology Commission of Shanghai Municipality