High-Performance Tensor Contraction without Transposition
Preprint
Abstract
Tensor computations--in particular tensor contraction (TC)--are important kernels in many scientific computing applications. Due to the fundamental similarity of TC to matrix multiplication (MM) and to the availability of optimized implementations such as the BLAS, tensor operations have traditionally been implemented in terms of BLAS operations, incurring both a performance and a storage overhead. Instead, we implement TC using the flexible BLIS framework, which allows for transposition (reshaping) of the tensor to be fused with internal partitioning and packing operations, requiring no explicit transposition operations or additional workspace. This implementation, TBLIS, achieves performance approaching that of MM, and in some cases considerably higher than that of traditional TC. Our implementation supports multithreading using an approach identical to that used for MM in BLIS, with similar performance characteristics. The complexity of managing tensor-to-matrix transformations is also handled automatically in our approach, greatly simplifying its use in scientific applications.Keywords
All Related Versions
This publication has 25 references indexed in Scilit:
- On the Performance Prediction of BLAS-based Tensor Contractions2015
- A massively parallel tensor contraction framework for coupled-cluster computationsJournal of Parallel and Distributed Computing, 2014
- 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
- Optimizing tensor contraction expressions for hybrid CPU-GPU executionCluster Computing, 2011
- Applied Multiway Data Analysis2007
- Multi‐Way Analysis with Applications in the Chemical Sciences2004
- Multilinear Analysis of Image Ensembles: TensorFaces2002
- Arrays in Blitz++1998
- A fifth-order perturbation comparison of electron correlation theoriesChemical Physics Letters, 1989