Introduction
The development of specialized hardware accelerators is currently a "siloed" process. While hardware design tools have matured, testing a new design on a real-world application—such as a full ResNet model—remains prohibitively difficult. This difficulty stems from a persistent gap: every time a hardware design changes, the software stack, including the compiler and the simulator, must be manually updated.
As a result, many researchers evaluate their designs only on synthetic workloads or isolated kernels. This approach often hides critical system-level issues, such as numerical precision errors that cascade across layers or bottlenecks in data movement, until it is too late and too expensive to fix the hardware.
The 3LA Methodology
To bridge this gap, the 3LA (Application-Level Validation of Accelerator Designs) methodology introduces a formal software/hardware interface for accelerators, analogous to how an Instruction Set Architecture (ISA) works for CPUs.
3LA relies on three primary pillars:
- Instruction-Level Abstraction (ILA): Rather than treating an accelerator as a black box, 3LA defines it as a set of instructions with formal semantics. This serves as a "single source of truth" used to automatically generate a functional simulator.
- Flexible Matching: Traditional compilers rely on "exact matching," failing if code structure (like tensor reshapes) differs even slightly from expected patterns. 3LA uses equality saturation (via the
egglibrary) to explore a massive space of mathematically equivalent program versions, allowing the compiler to "discover" offload opportunities that are not syntactically obvious. - Automated Co-Simulation: By combining the auto-generated ILA simulator with a standard host CPU simulator, 3LA enables "software-like" debugging. Designers can run full applications to observe how custom numerics or memory layouts affect final outputs early in the design cycle.
Key Insights and Results
The authors evaluated 3LA using six diverse Deep Learning (DL) applications (including EfficientNet, Transformer, and ResNet) across three accelerators: FlexASR (NLP), HLSCNN (CNN), and VTA (tensor operations).
Semantic vs. Syntactic Matching
The paper demonstrates that flexible matching is essential for modern models. For instance, in a Transformer model, 3LA identified 66 offload opportunities for FlexASR, whereas a standard compiler found zero because the code structure did not perfectly match the expected API pattern.
Catching "Silent" Numerical Bugs
A significant finding involved a flaw in the HLSCNN accelerator. While unit tests passed, running a full MobileNet-V2 model revealed that accuracy plummeted to 10% due to 8-bit quantization lacking sufficient dynamic range. Using 3LA, the team quickly identified the issue and implemented a fix in the ILA spec—expanding the internal representation to 16-bit fixed-point—which recovered accuracy to ~91%.
Efficiency Gains
3LA's ILA-based simulators provided a 30x speedup over traditional Register Transfer Level (RTL) simulation (e.g., Verilator). This performance boost makes end-to-end testing of large image batches feasible during the design phase rather than after fabrication.
Limitations and Future Work
While 3LA automates stack updates, the initial creation of the ILA specification and mapping rules still requires manual effort. Additionally, the current prototype focuses on selection (what to offload) rather than scheduling (optimal tiling and loop ordering). Future research aims to expand these techniques beyond Deep Learning into domains like graph processing and signal processing.
Summary updated