Design of a high-performance GEMM-like Tensor-Tensor Multiplication

Paul Springer, Paolo Bientinesi
7/1/2016
112 citations
cs.MScs.PF

Official code: HPAC/tccg (41 stars, Python, last commit 2017-08-14).

Abstract

We present "GEMM-like Tensor-Tensor multiplication" (GETT), a novel approach to tensor contractions that mirrors the design of a high-performance general matrix-matrix multiplication (GEMM). The critical insight behind GETT is the identification of three index sets, involved in the tensor contraction, which enable us to systematically reduce an arbitrary tensor contraction to loops around a highly tuned "macro-kernel".

Show full abstract

This macro-kernel operates on suitably prepared ("packed") sub-tensors that reside in a specified level of the cache hierarchy. In contrast to previous approaches to tensor contractions, GETT exhibits desirable features such as unit-stride memory accesses, cache-awareness, as well as full vectorization, without requiring auxiliary memory. To compare our technique with other modern tensor contractions, we integrate GETT alongside the so called Transpose-Transpose-GEMM-Transpose and Loops-over-GEMM approaches into an open source "Tensor Contraction Code Generator" (TCCG). The performance results for a wide range of tensor contractions suggest that GETT has the potential of becoming the method of choice: While GETT exhibits excellent performance across the board, its effectiveness for bandwidth-bound tensor contractions is especially impressive, outperforming existing approaches by up to $12.4\times$. More precisely, GETT achieves speedups of up to $1.41\times$ over an equivalent-sized GEMM for bandwidth-bound tensor contractions while attaining up to $91.3\%$ of peak floating-point performance for compute-bound tensor contractions.

View on arXivView PDF

Code Implementations(1)

HPAC/tccgOfficial100%

Tensor Contraction Code Generator

413Python, MakefileJun 30, 20169 years ago

Similar Papers

Cite this paper

@article{springer2016design,
  title  = {Design of a high-performance GEMM-like Tensor-Tensor Multiplication},
  author = {Paul Springer and Paolo Bientinesi},
  year   = {2016},
  eprint = {1607.00145},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1607.00145}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1607.00145.svg)](https://codeofpaper.com/paper/1607.00145)

Discussion