Flexible Performant Tensor Contractions on GPUs
- 27 January 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Parallel and Distributed Systems
- Vol. 37 (4) , 787-804
Abstract
Tensor contractions extend the concept of the General Matrix Multiplication (GEMM) to high-dimensional spaces. They enable sophisticated computations in various scientific disciplines. Graphics Processing Units (GPUs) are commonly used to accelerate tensor contraction algorithms due to their inherent parallelisability. NVIDIA’s cuTENSOR stands as a state-of-the-art library for GPU-based tensor contractions. However, its lack of flexibility limits researchers in tailoring contraction kernels to their specific research needs. This paper presents a novel and flexible implementation of the GEMM-like Tensor Tensor (GETT) multiplication algorithm for tensor contractions in Julia. By repurposing and adapting components of GemmKernels.jl, a versatile library offering customisable and high-performance GEMM kernels for CUDA-enabled GPUs, we construct GEMM-like kernels that cater to the unique requirements of tensor contractions. Despite being entirely written in high-level Julia code and not yet exploiting a range of modern CUDA hardware features, the average performance of our library on standard tensor contractions compares favourably to cuTENSOR’s hand-optimised implementations, with outliers in both directions (faster and slower). When flexibility is needed, e.g. to fuse arbitrary elementwise operations into kernels, our library performs up to an order of magnitude faster than cuTENSOR, even on recent, data centre-grade devices such as the RTX 6000 Ada.Keywords
Funding Information
- Fonds Wetenschappelijk Onderzoek (11I1123N)
This publication has 35 references indexed in Scilit:
- Quantum Perturbation Theory Using Tensor Cores and a Deep Neural NetworkJournal of Chemical Theory and Computation, 2022
- Quantum-Based Molecular Dynamics Simulations Using Tensor CoresJournal of Chemical Theory and Computation, 2021
- MLIR: Scaling Compiler Infrastructure for Domain Specific Computation2021
- A Code Generator for High-Performance Tensor Contractions on GPUs2019
- High-performance Tensor Contractions for GPUsProcedia Computer Science, 2016
- Towards an efficient use of the BLAS library for multilinear tensor contractionsApplied Mathematics and Computation, 2014
- New implementation of high‐level correlated methods using a general block tensor library for high‐performance electronic structure calculationsJournal of Computational Chemistry, 2013
- GPU-Based Implementations of the Noniterative Regularized-CCSD(T) Corrections: Applications to Strongly Correlated SystemsJournal of Chemical Theory and Computation, 2011
- LLVM: A compilation framework for lifelong program analysis & transformation2004
- The Bayesian Approach to Local Optimization1989