SODA-OPT: enabling system-level design in MLIR for HLS and beyond
Nícolas Bohm Agostini · 2022
System-level design frameworks commonly rely on annotated high-level language code snippets written in C/C++ to perform High-Level Synthesis (HLS). This is especially true when generating designs for specialized accelerators. However, new dataflow and machine learning frameworks use high-level programming languages and only employ C/C++ in their runtimes. This abstraction gap requires the user to translate application code to C/C++, or resort to the composition of pre-configured high-level hardware modules, resulting in a significant productivity gap. To address this gap, we propose SODA-OPT, a front-end compiler that leverages the MLIR framework to automatically partition host code from accelerator code, pre-optimizing the accelerator code to produce better HLS designs. SODA-OPT allows the user to outline and synthesize custom accelerators for a range of high-level applications. SODA-OPT applies optimizations at the appropriate level of abstraction, enabling the generation of high-quality accelerated kernels. This thesis highlights the importance and effectiveness of high-level optimizations applied before the HLS backend. We evaluate our new compilation flow by exploring automated generation of accelerators for deep neural network operators, outlined at arbitrary granularities. Our compiler interfaces to a design space exploration engine, enabling us to identify the best combination of compiler optimization passes and options, resulting in high-performance designs for the selected backend target. Experimental results with key linear algebra kernels show that high-level optimizations expose code structures that result in speedups up to 60x faster when our optimization pipeline is tuned to the target HLS backend.--Author's abstract