# Performance Engineering for Real and Complex Tall & Skinny Matrix   Multiplication Kernels on GPUs

**Authors:** Dominik Ernst, Georg Hager, Jonas Thies, Gerhard Wellein

arXiv: 1905.03136 · 2020-06-25

## TL;DR

This paper presents a novel, autotuned approach for optimizing tall & skinny matrix multiplication kernels on GPUs, significantly improving performance over existing vendor libraries by leveraging code generation and flexible parallelization strategies.

## Contribution

It introduces a new implementation strategy for tall & skinny matrix multiplication on GPUs, using code generation and autotuning to achieve near-roofline performance.

## Key findings

- Achieves at least 2/3 of roofline performance across various matrix sizes.
- Substantially outperforms NVIDIA's CUBLAS for tall & skinny matrices.
- Provides a flexible, configurable mapping scheme for optimized GPU kernel execution.

## Abstract

General matrix-matrix multiplications with double-precision real and complex entries (DGEMM and ZGEMM) in vendor-supplied BLAS libraries are best optimized for square matrices but often show bad performance for tall & skinny matrices, which are much taller than wide. NVIDIA's current CUBLAS implementation delivers only a fraction of the potential performance as indicated by the roofline model in this case. We describe the challenges and key characteristics of an implementation that can achieve close to optimal performance. We further evaluate different strategies of parallelization and thread distribution, and devise a flexible, configurable mapping scheme. To ensure flexibility and allow for highly tailored implementations we use code generation combined with autotuning. For a large range of matrix sizes in the domain of interest we achieve at least 2/3 of the roofline performance and often substantially outperform state-of-the art CUBLAS results on an NVIDIA Volta GPGPU.

## Full text

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

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/1905.03136/full.md

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