SIMD$^2$: A Generalized Matrix Instruction Set for Accelerating Tensor Computation beyond GEMM

Yunan Zhang, Po-An Tsai, Hung-Wei Tseng
5/3/2022
cs.AR

Official code: escalab/SIMD2 (31 stars, C, last commit 2022-06-15).

Abstract

Matrix-multiplication units (MXUs) are now prevalent in every computing platform. The key attribute that makes MXUs so successful is the semiring structure, which allows tiling for both parallelism and data reuse.

Show full abstract

Nonetheless, matrix-multiplication is not the only algorithm with such attributes. We find that many algorithms share the same structure and differ in only the core operation; for example, using add-minimum instead of multiply-add. Algorithms with a semiring-like structure therefore have potential to be accelerated by a general-purpose matrix operation architecture, instead of common MXUs. In this paper, we propose SIMD$^2$, a new programming paradigm to support generalized matrix operations with a semiring-like structure. SIMD$^2$ instructions accelerate eight more types of matrix operations, in addition to matrix multiplications. Since SIMD$^2$ instructions resemble a matrix-multiplication instruction, we are able to build SIMD$^2$ architecture on top of any MXU architecture with minimal modifications. We developed a framework that emulates and validates SIMD$^2$ using NVIDIA GPUs with Tensor Cores. Across 8 applications, SIMD2 provides up to 38.59$\times$ speedup and more than 10.63$\times$ on average over optimized CUDA programs, with only 5% of full-chip area overhead.

View on arXivView PDF

Code Implementations(1)

escalab/SIMD2Official100%
316C, C++Oct 13, 20214 years ago

Similar Papers

Cite this paper

@article{zhang2022simd,
  title  = {SIMD$^2$: A Generalized Matrix Instruction Set for Accelerating Tensor Computation beyond GEMM},
  author = {Yunan Zhang and Po-An Tsai and Hung-Wei Tseng},
  year   = {2022},
  eprint = {2205.01252},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.01252}
}

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/2205.01252.svg)](https://codeofpaper.com/paper/2205.01252)

Discussion