# Strassen's Algorithm for Tensor Contraction

**Authors:** Jianyu Huang, Devin A. Matthews, Robert A. van de Geijn

arXiv: 1704.03092 · 2017-04-12

## TL;DR

This paper extends Strassen's algorithm to tensor contraction, a multi-dimensional generalization of matrix multiplication, demonstrating practical speedups by optimizing tensor layout and avoiding transpositions.

## Contribution

First practical demonstration of accelerating tensor contraction with Strassen's algorithm using a novel tensor layout and optimized implementation techniques.

## Key findings

- Achieved up to 1.3x speedup on modern architectures
- Introduced a Block-Scatter-Matrix tensor layout for efficient computation
- Avoided explicit transpositions and extra workspace in implementation

## Abstract

Tensor contraction (TC) is an important computational kernel widely used in numerous applications. It is a multi-dimensional generalization of matrix multiplication (GEMM). While Strassen's algorithm for GEMM is well studied in theory and practice, extending it to accelerate TC has not been previously pursued. Thus, we believe this to be the first paper to demonstrate how one can in practice speed up tensor contraction with Strassen's algorithm. By adopting a Block-Scatter-Matrix format, a novel matrix-centric tensor layout, we can conceptually view TC as GEMM for a general stride storage, with an implicit tensor-to-matrix transformation. This insight enables us to tailor a recent state-of-the-art implementation of Strassen's algorithm to TC, avoiding explicit transpositions (permutations) and extra workspace, and reducing the overhead of memory movement that is incurred. Performance benefits are demonstrated with a performance model as well as in practice on modern single core, multicore, and distributed memory parallel architectures, achieving up to 1.3x speedup. The resulting implementations can serve as a drop-in replacement for various applications with significant speedup.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.03092/full.md

## Figures

17 figures with captions in the complete paper: https://tomesphere.com/paper/1704.03092/full.md

## References

41 references — full list in the complete paper: https://tomesphere.com/paper/1704.03092/full.md

---
Source: https://tomesphere.com/paper/1704.03092