Implementing High-performance Complex Matrix Multiplication via the 3m and 4m Methods
Authors:
Open Access
- 24 July 2017
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Mathematical Software
- Vol. 44 (1) , 1-36
Abstract
In this article, we explore the implementation of complex matrix multiplication. We begin by briefly identifying various challenges associated with the conventional approach, which calls for a carefully written kernel that implements complex arithmetic at the lowest possible level (i.e., assembly language). We then set out to develop a method of complex matrix multiplication that avoids the need for complex kernels altogether. This constraint promotes code reuse and portability within libraries such as Basic Linear Algebra Subprograms and BLAS-Like Library Instantiation Software (BLIS) and allows kernel developers to focus their efforts on fewer and simpler kernels. We develop two alternative approaches—one based on the 3 m method and one that reflects the classic 4 m formulation—each with multiple variants, all of which rely only on real matrix multiplication kernels. We discuss the performance characteristics of these “induced” methods and observe that the assembly-level method actually resides along the 4 m spectrum of algorithmic variants. Implementations are developed within the BLIS framework, and testing on modern hardware confirms that while the less numerically stable 3 m method yields the fastest runtimes, the more stable (and thus widely applicable) 4 m method’s performance is somewhat limited due to implementation challenges that appear inherent in nature.Keywords
Funding Information
- National Science Foundation (CCF-1320112, ACI-1148125/1340293, and ACI-1550493)
This publication has 19 references indexed in Scilit:
- ElementalACM Transactions on Mathematical Software, 2013
- Numerical linear algebra on emerging architectures: The PLASMA and MAGMA projectsJournal of Physics: Conference Series, 2009
- High-performance implementation of the level-3 BLASACM Transactions on Mathematical Software, 2008
- Anatomy of high-performance matrix multiplicationACM Transactions on Mathematical Software, 2008
- The LINPACK Benchmark: past, present and futureConcurrency and Computation: Practice and Experience, 2003
- Stability of block algorithms with fast level-3 BLASACM Transactions on Mathematical Software, 1992
- Stability of a Method for Multiplying Complex Matrices with Three Real Matrix MultiplicationsSIAM Journal on Matrix Analysis and Applications, 1992
- Exploiting fast matrix multiplication within the level 3 BLASACM Transactions on Mathematical Software, 1990
- A set of level 3 basic linear algebra subprogramsACM Transactions on Mathematical Software, 1990
- Gaussian elimination is not optimalNumerische Mathematik, 1969