Matching Linear Algebra and Tensor Code to Specialized Hardware Accelerators

01/27/2023
by   Pablo Antonio Martínez, et al.
0

Dedicated tensor accelerators demonstrate the importance of linear algebra in modern applications. Such accelerators have the potential for impressive performance gains, but require programmers to rewrite code using vendor APIs - a barrier to wider scale adoption. Recent work overcomes this by matching and replacing patterns within code, but such approaches are fragile and fail to cope with the diversity of real-world codes. We develop ATC, a compiler that uses program synthesis to map regions of code to specific APIs. The mapping space that ATC explores is combinatorially large, requiring the development of program classification, dynamic analysis, variable constraint generation and lexical distance matching techniques to make it tractable. We apply ATC to real-world tensor and linear algebra codes and evaluate them against four state-of-the-art approaches. We accelerate between 2.6x and 7x more programs, leading to over an order of magnitude performance improvement.

READ FULL TEXT

page 3

page 5

research
04/17/2023

TeAAL: A Declarative Framework for Modeling Sparse Tensor Accelerators

Over the past few years, the explosion in sparse tensor algebra workload...
research
03/15/2022

DISTAL: The Distributed Tensor Algebra Compiler

We introduce DISTAL, a compiler for dense tensor algebra that targets mo...
research
04/23/2018

Format Abstraction for Sparse Tensor Algebra Compilers

This paper shows how to build a sparse tensor algebra compiler that is a...
research
08/03/2020

A Learned Performance Model for Tensor Processing Units

Accurate hardware performance models are critical to efficient code gene...
research
02/05/2022

Source Matching and Rewriting

A typical compiler flow relies on a uni-directional sequence of translat...
research
08/31/2022

The Sparse Abstract Machine

We propose the Sparse Abstract Machine (SAM), an intermediate representa...
research
08/02/2022

OLLIE: Derivation-based Tensor Program Optimizer

Boosting the runtime performance of deep neural networks (DNNs) is criti...

Please sign up or login with your details

Forgot password? Click here to reset