- Main
Matrix Multiplication is Almost All You Need
- Alex, Andrew David
- Advisor(s): Balkind, Jonathan
Abstract
Matrix multiplication is a bottleneck operation needed by many classes of algorithms in several domains. As such a ubiquitous operation, many modern computing systems possess specialized hardware accelerators. These accelerators often rely on small, general-purpose host CPUs to orchestrate the entire application and run portions of it that cannot be run on the accelerator incurring expensive communication overhead. In this work, I explore the possibility of instead executing general-purpose code on the matrix-multiplication accelerator to alleviate this overhead and enable applications to be entirely executed within the accelerator. I present a compiler, The Ultimate Mullifier, that targets the ISA of an open source matrix multiplication accelerator, OpenTPU, and takes as its source unmodified programs written in a subset of C. This subset is wide enough to express common algorithms for sorting, searching, and graph traversal with only minor hardware and ISA modifications required. I evaluate these common algorithms as microbenchmarks and show accelerator-only execution can be more efficient in many circumstances.