Table of Contents
Fetching ...

Stencil Matrixization

Wenxuan Zhao, Liang Yuan, Baicheng Yan, Penghao Ma, Yunquan Zhang, Long Wang, Zhe Wang

TL;DR

This paper introduces a novel stencil algorithm leveraging vector outer products that emerges from the stencil definition in scatter mode and is initially formulated using vector outer product expressions.

Abstract

Current architectures are now equipped with matrix computation units designed to enhance AI and high-performance computing applications. Within these architectures, two fundamental instruction types are matrix multiplication and vector outer product, with the latter being lighter due to its vector inputs. This characteristic not only allows for the development of flexible algorithms beyond dense linear algebra computations but also offers greater potential for implementation optimization. Stencil computations, commonly found in scientific and engineering applications, involve nested loops. This paper introduces a novel stencil algorithm leveraging vector outer products. Unlike previous approaches, this algorithm emerges from the stencil definition in scatter mode and is initially formulated using vector outer product expressions. The implementation integrates a series of optimizations to enhance memory reference patterns, execution pipeline efficiency, and data reuse. These optimizations consider various algorithmic options and data sharing among input vectors. Evaluation conducted on a simulator demonstrates that our proposed design achieves significant speedup compared to vectorized stencil algorithms.

Stencil Matrixization

TL;DR

This paper introduces a novel stencil algorithm leveraging vector outer products that emerges from the stencil definition in scatter mode and is initially formulated using vector outer product expressions.

Abstract

Current architectures are now equipped with matrix computation units designed to enhance AI and high-performance computing applications. Within these architectures, two fundamental instruction types are matrix multiplication and vector outer product, with the latter being lighter due to its vector inputs. This characteristic not only allows for the development of flexible algorithms beyond dense linear algebra computations but also offers greater potential for implementation optimization. Stencil computations, commonly found in scientific and engineering applications, involve nested loops. This paper introduces a novel stencil algorithm leveraging vector outer products. Unlike previous approaches, this algorithm emerges from the stencil definition in scatter mode and is initially formulated using vector outer product expressions. The implementation integrates a series of optimizations to enhance memory reference patterns, execution pipeline efficiency, and data reuse. These optimizations consider various algorithmic options and data sharing among input vectors. Evaluation conducted on a simulator demonstrates that our proposed design achieves significant speedup compared to vectorized stencil algorithms.
Paper Structure (20 sections, 16 equations, 5 figures, 3 tables, 1 algorithm)

This paper contains 20 sections, 16 equations, 5 figures, 3 tables, 1 algorithm.

Figures (5)

  • Figure 1: Coefficient line options for star stencils
  • Figure 2: Multi-dimensional unrolling and outer product scheduling
  • Figure 3: Performance of star stencils with various coefficient line options
  • Figure 4: Improvement of multi-dimensional unrolling and outer product scheduling
  • Figure 5: Performance comparison with existing vectorization methods for stencils with $r=1$