Specialized Accelerators and Compiler Flows: Replacing Accelerator APIs with a Formal Software/Hardware Interface

03/01/2022
by   Bo-Yuan Huang, et al.
0

Specialized accelerators are increasingly used to meet the power-performance goals of emerging applications such as machine learning, image processing, and graph analysis. Existing accelerator programming methodologies using APIs have several limitations: (1) The application code lacks portability to other platforms and compiler frameworks; (2) the lack of integration of accelerator code in the compiler limits useful optimizations such as instruction selection and operator fusion; and (3) the opacity of the accelerator function semantics limits the ability to check the final code for correctness. The root of these limitations is the lack of a formal software/hardware interface specification for accelerators. In this paper, we use the recently developed Instruction-Level Abstraction (ILA) for accelerators to serve this purpose, similar to how the Instruction Set Architecture (ISA) has been used as the software/hardware interface for processors. We propose a compiler flow termed D2A using the ILA and present a prototype that demonstrates this flow for deep learning (DL) applications. This prototype compiles programs from high-level domain-specific languages, e.g., PyTorch and MxNet, to multiple target accelerators with no target-specific extensions to the application or compiler - thus demonstrating application portability. It includes compiler optimizations through instruction selection using equality saturation-based flexible matching. Finally, we show checking the correctness of the resulting code through formal verification of individual matched operations and fully automated simulation-based validation of complete applications. The evaluation of the prototype compiler is based on six different DL applications and three different accelerators. Overall, this methodology lays the foundation for integrating accelerators in compiler flows using a formal software/hardware interface.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/03/2018

Instruction-Level Abstraction (ILA): A Uniform Specification for System-on-Chip (SoC) Verification

Modern Systems-on-Chip (SoC) designs are increasingly heterogeneous and ...
research
07/14/2020

SESAME: Software defined Enclaves to Secure Inference Accelerators with Multi-tenant Execution

Hardware-enclaves that target complex CPU designs compromise both securi...
research
10/21/2022

Programming Bare-Metal Accelerators with Heterogeneous Threading Models: A Case Study of Matrix-3000

As the hardware industry moves towards using specialized heterogeneous m...
research
12/18/2020

Towards Formally Verified Compilation of Tag-Based Policy Enforcement

Hardware-assisted reference monitoring is receiving increasing attention...
research
04/01/2021

A Multipurpose Formal RISC-V Specification

RISC-V is a relatively new, open instruction set architecture with a mat...
research
04/16/2020

The MosaicSim Simulator (Full Technical Report)

As Moore's Law has slowed and Dennard Scaling has ended, architects are ...
research
12/04/2022

Differential Testing of a Verification Framework for Compiler Optimizations (Experience Paper)

We want to verify the correctness of optimization phases in the GraalVM ...

Please sign up or login with your details

Forgot password? Click here to reset