Karatsuba Matrix Multiplication and its Efficient Custom Hardware Implementations

Trevor E. Pogue, Nicola Nicolici
1/15/2025
cs.ARcs.AIcs.PF

No official code found. Best implementation: trevorpogue/algebraic-nnhw (296 stars, last commit 2025-02-28).

Abstract

While the Karatsuba algorithm reduces the complexity of large integer multiplication, the extra additions required minimize its benefits for smaller integers of more commonly-used bitwidths. In this work, we propose the extension of the scalar Karatsuba multiplication algorithm to matrix multiplication, showing how this maintains the reduction in multiplication complexity of the original Karatsuba algorithm while reducing the complexity of the extra additions. Furthermore, we propose new matrix multiplication hardware architectures for efficiently exploiting this extension of the Karatsuba algorithm in custom hardware. We show that the proposed algorithm and hardware architectures can provide real area or execution time improvements for integer matrix multiplication compared to scalar Karatsuba or conventional matrix multiplication algorithms, while also supporting implementation through proven systolic array and conventional multiplier architectures at the core. We provide a complexity analysis of the algorithm and architectures and evaluate the proposed designs both in isolation and in an end-to-end deep learning accelerator system compared to baseline designs and prior state-of-the-art works implemented on the same type of compute platform, demonstrating their ability to increase the performance-per-area of matrix multiplication hardware.

View on arXivView PDF

Code Implementations(1)

Algebraic enhancements for GEMM & AI accelerators

29619Shell, StataApr 25, 20231 years ago
acceleratorarchitectureartificial-inteligencedeep-neural-networkshardware+7 more

Similar Papers

Cite this paper

@article{pogue2025karatsuba,
  title  = {Karatsuba Matrix Multiplication and its Efficient Custom Hardware Implementations},
  author = {Trevor E. Pogue and Nicola Nicolici},
  year   = {2025},
  eprint = {2501.08889},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.08889v1}
}

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

Discussion