Editor’s introduction
The study evaluates performance estimation for four DNN accelerator architectures—Gemmini, UltraTrail, Plasticine-derived, and a parameterizable systolic array—by mapping common edge AI models like TC-ResNet8, EfficientNet, and AlexNet. It measures latency using a combined DNN/hardware dependency graph analysis, estimating performance by evaluating just 154 loop iterations across 4.19 billion instructions. The approach achieves lower mean absolute percentage error than regression and analytical models while being significantly faster than RTL simulation. Results show that data-dependent instructions are stalled until prior data is available, enabling correct execution through implicit data dependencies. The method does not support modeling cache hierarchies, DRAM, or on-chip buses, nor does it include power semantics, limiting its applicability to architectures relying solely on SRAM and standard cell memory.
Introduction
Additionally, during the early design phase of an accelerator, it is crucial to compare different variants with each other quickly. On the hardware side, these variants range from changes in the number of available multiply-accumulate units to entirely different data paths. On the software side, hardware-aware Network Architecture Search (NAS) can explore different hyperparameters and data reuse strategies for mapping DNNs onto an accelerator. Building accurate performance models for all those variants and combinations is only feasible with a fast and automated approach.
Related Work
In PreVIous, a specially designed DNN composed of different layers with varying parameters is executed on the CPUs of single-board computers. During the execution of this DNN, the end-to-end latency and energy consumption for each layer are measured. The measurements are used together with the layer parameters to train linear regression models for execution time and energy consumption estimation. In terms of execution time, PreVIous achieves a MAPE between 3.25% and 7.92%. However, collecting the data is time-consuming and requires the hardware for which the estimation should be made.
ANNETTE uses micro-kernel benchmarks and multi-layer benchmarks of DNNs executed on an FPGA and an ASIC accelerator to characterize the performance of those platforms. Similar to PreVIous special DNNs are used to measure the execution time of several different layers in one benchmark run. The layer execution time measurements are combined with refined roofline models, incorporating utilization efficiency, for each layer which are used when no measurements for a layer exist to estimate the execution time of a whole DNN executed on one of the selected accelerators reaching a MAPE between 3.47% and 7.44%.
Timeloop proposes an analytical modeling framework for execution time and energy consumption based on coarse textual descriptions of accelerator architectures and the mapping of convolutional and fully-connected layers. Compared to three real-world accelerators, an average accuracy in terms of execution time of 95% is achieved. Timeloop does not consider pipeline stalls, resource conflicts and instruction-level parallelism, which can lead to an accuracy as low as 78%.
Aladdin and its extension construct an unconstrained data dependency graph for an algorithm. Then hardware properties of an accelerator architecture, the algorithm should be mapped onto, constrain this data dependency graph resulting in an average execution time estimation error of 0.9% for a simple but parameterizable accelerator (Aladdin), and an estimation error of 7.1% for Eyeriss, and 5.6% for the DSIP accelerator (extension).
Our estimation approach provides a systematic way to model accelerator architectures that cover various parameterizable design alternatives on different hardware and software abstraction levels, ranging from scalar operations up to fused tensor operations. We show the generality and accuracy of our proposed approach by modeling four architecturally different accelerators and estimating the performance of those using three state-of-the art DNNs tailored for edge devices and comparing it with literature-reported regression models, refined roofline models, and Timeloop.
Abstract Computer Architecture Description Language
Computer architectures are almost exclusively communicated using block diagrams. Each block in a block diagram describes the function of the computer architecture module it represents, while arrows are used to depict how data is exchanged between different modules. However, modeling computer architectures on the system level is mainly done using hardware description languages like VHDL and Verilog or electronic system-level languages such as SystemC.
Especially in the early design phase of new computer architectures, it is crucial to evaluate the performance of different design alternatives. However, using the aforementioned hardware description languages requires a lot of expert knowledge and time to produce working design alternatives, leading to low productivity. Therefore, we use the Abstract Computer Architecture Description Language (ACADL) that does not require extensive hardware design knowledge.
Types and Classes
Association describes the relation between two or more instantiated objects of classes that allows one object (caller) to cause another one to perform an action (callee), while:call signifies the callee’s function that is called by the caller.
Instruction has several attributes describing which registers (read_registers, write_registers) and memory addresses (read_addresses, write_addresses) and immediate values (immediates) are accessed when it is executed. operation is the instruction’s mnemonic, while function contains how data is manipulated. execute calls function when the instruction is processed by a FunctionalUnit. Furthermore, an instruction is not limited to fine-grained operations such as addition or multiplication. An instruction can also carry out complex operations like matrix-matrix multiplication or Fourier transformations. This enables modeling at different abstraction levels.
PipelineStage is responsible for forwarding instructions inside a computer architecture. receive is called by forward of another PipelineStage which forwards an instruction between two PipelineStages. An Instruction can only be forwarded if the receiving PipelineStage is ready. The amount of clock cycles an Instruction resides inside a PipelineStage before it is forwarded is indicated by latency.
FunctionalUnit executes an Instruction that is passed to process and changes the architectural state by changing register contents using read and write of RegisterFiles. A RegisterFile can be read-only, write-only, or readable and writable depending on the:read/:write associations connecting FunctionalUnits and RegisterFiles. FunctionalUnits can only process Instructions whose operation is in to_process and if the FunctionalUnit has read/write access to the read_registers and write_registers. Processing a supported Instruction takes latency clock cycles after all data dependencies from previous Instructions are resolved.
ExecuteStage inherits from PipelineStage and overrides receive and additionally contains FunctionalUnits. When an ExecuteStage receives an Instruction, it checks all its contained FunctionalUnits if one of them supports processing the Instruction. The check involves if operation is in to_process and if the read_registers and write_registers are accessible by the FunctionalUnit. When a contained FunctionalUnit supports the Instruction, the ExecuteStage passes the Instruction to process and the ExecuteStage’s latency is not accumulated.
General Modeling Workflow
The first method is the top-down modeling of an accelerator. This modeling method is to be used when exploring the design of a new architecture. Using the envisioned accelerator capabilities supported operations are formulated. Together with structural information of the accelerator hardware a high-level ACADL object diagram can be created. Mapping DNNs onto the ACADL object diagram together with the proposed performance evaluation allows to validate the high-level design. This validated ACADL object diagram can than be decomposed into smaller modules and validated again. By iterative refinement and validation, a detailed ACADL object diagram for an accelerator is obtained.
The UML-based representation of the ACADL class diagram enables developers to use a graphical UML editor to create accelerator architecture object diagrams. A suitable export plugin would be required to automatically generate an analyzable ACADL model from such an object diagram.
Modeling Examples
In this section, we present two different example accelerator architectures, to show how these can be modeled as an ACADL object diagram using their architectural block diagrams. While the first architecture is modeled in ACADL using scalar instructions, the second architecture is modeled using fused tensor instructions and thus addressing different abstraction levels.
These two examples show how ACADL can be employed to model edge AI accelerator architectures at different abstraction levels, from fine-grained scalar modeling of individual functional units to coarse tensor models that bundle several hardware elements together. Nevertheless, ACADL is not limited to accelerator architectures and can also model processor pipelines and memory-mapped communication between CPUs and accelerators; however, this is beyond the scope of this paper. ACADL provides a high degree of flexibility in the software representation through instructions ranging from atomic operations, such as multiplication and addition, up to fused vector/matrix operations and loading or storing multiple data words in a single transaction, thereby enabling to model any DNN layer that can be expressed using those operations. These abstraction levels allow us to model complex accelerator architectures with a precise latency semantic and facilitate a shallow learning curve where a developer can start on a high abstraction level, such as the presented UltraTrail model, and can then iteratively refine the model down to single registers and multiply-accumulate units.
Extendability and Limitations
The version of ACADL presented in this paper does not support describing cache hierarchies, DRAM, and on-chip busses without extending the class diagram. We choose not to include those because many edge AI accelerator architectures heavily rely on SRAM and standard cell memory for their on-chip memory. Additionally, there is currently no power semantic to describe the energy demand of a modeled computer architecture.
Deep Neural Network Mapping
In the previous section, we have seen how we can model accelerator architectures on different abstraction levels using ACADL. To estimate the performance of an accelerator architecture, we also need to represent the DNN layers to be executed.
The relevant difference is that the UltraTrail accelerator operates with tensor-level conv_ext instructions, while the systolic array executes scalar instructions like load and mac. Therefore, the granularity of the representation of the DNN layer needs to match the abstraction level of the ACADL model.
Moving to more abstract hardware models, the instructions to be executed also become more abstract. For example, some accelerator architectures only support tiled matrix-matrix multiplications (GEMM) with sometimes fused pooling and activation operations. Therefore, the instructions for an end-to-end latency estimation of a DNN layer need to be generated accordingly. Firstly, by converting the convolutional or fully-connected layer to a GEMM computation using an im2col transformation and, secondly, by tiling the resulting matrix-matrix multiplication to fit the supported tile size of the accelerator.
Overall, to create a valid DNN layer mapping for an architecture modeled in ACADL, one needs to consider the operations that can be executed on the given hardware and then partition the DNN layers according to these operations. For low-level models, this could be load and mac instructions, for intermediate-level models gemm instructions, and for high-level models conv_ext instructions.
Lastly, layer fusion, pruning, and quantization are considered differently on the different abstraction levels. For low-level instructions, a tool like TVM can provide an already optimized computation graph where e.g. the activation function is fused into a preceding convolutional layer and unimportant weights and computations have been removed. The unrolling would then be done on the optimized layer. On a higher abstraction level, layer fusion, pruning, and quantization depends on the architecture’s capability. In the case of UltraTrail, the quantized and fused conv_ext layer computes the convolution, pooling, and activation using its MAC-array and output processing unit (OPU). For the systolic array a pruned layer would contain less instructions which could lead to an sub-optimal utilization. As a result, layer fusion, pruning, and quantization is incorporated either explicitly by mapping already optimized layers or implicitly via tensor-level operations.
Architectural Instruction Dependency Graph
To accurately estimate the performance of DNNs mapped onto an accelerator architecture without using a simulator, we propose the Architectural Instruction Dependency Graph (AIDG), capturing when an instruction occupies a hardware module (ACADL object), in which order an instruction propagates through an accelerator (forward), resource conflicts (structural dependencies), data dependencies, and buffer fill levels, extending the Execution Graph proposed by Li et al..
Evaluation
Given an arbitrary ACADL model of an accelerator architecture and instructions on the same abstraction level, we can construct and evaluate an AIDG to make an end-to-end latency estimation. For fused, pruned, and/or quantized DNN layers, the loop kernel to be evaluated in an AIDG would contain fewer and/or different instructions than an unoptimized DNN layer. However, the AIDG construction and evaluation are agnostic towards a loop kernel’s number and kind of instructions.
End-to-end Latency of a Deep Neural Network Layer
When executing consecutive iterations in a pipeline, the end-to-end latency of a single iteration cannot be multiplied to get the execution time of the whole loop. This is because successive iterations overlap each other in a pipeline. Moreover, loop-carried dependencies can lead to different end-to-end latencies in consecutive iterations. However, this difference in end-to-end latencies is only present in the first few iterations, while the end-to-end latencies of all following iterations only vary by a negligible amount.
Performance Model Evaluation and Results
After detailing our proposed performance estimation approach for DNN accelerators, this section presents and discusses the obtained modeling and estimation results for four different accelerator architectures and mapping the DNNs TC-ResNet8, EfficientNet, and AlexNet onto them. Those DNNs cover typical edge AI use-cases with the following layer types: 1D-, 2D-, and depth-wise convolution; fully-connected; average and max pooling; ReLU and clip activation; element-wise addition and multiplication; together with residual connections, which provide a wide variety of different workloads.
as an end-to-end latency estimation accuracy metric for layers of a whole DNN. We also report the runtime of our end-to-end latency estimation approach. All runtime measurements were conducted on an Intel Xeon Platinum 8168 CPU with 192 GB RAM running Ubuntu Linux 20.04 while the AIDG construction and evaluation is implemented as a single-threaded application.
Gemmini
To compare our latency estimation approach against analytical models, we used Timeloop and created a model of the Gemmini accelerator. Given Timeloop’s limitations, due to its coarse textual description, the Gemmini model is limited in its functionality. First, due to Timeloop’s lack of support for parallel memory structures in the hierarchy, our model contains a dependence between the tiling of the accumulator and the scratchpad. This dependence does not exist in the real hardware, as scratchpad and accumulator are completely independent memories.
Second, because Timeloop cannot simulate pipeline stalls or structural conflicts, we used the simplex method using Verilator measurements as input in order to find the best read and write bandwidths for each memory. This helps mitigate this Timeloop limitation, by limiting the actual bandwidth of each memory to encapsulate the effects of the decoupled access-execute structure of Gemmini on the real hardware. As a second analytical model, we also created a refined roofline model for Gemmini based on the model introduced by Wess et al..
Parameterizable Systolic Array
We instantiated the systolic array in different sizes, which refers to the number of processing elements. First, we ran an AIDG whole graph evaluation, meaning all iterations were evaluated for each DNN/systolic array pairing. The estimated cycles from this AIDG whole graph evaluation are used as a ground truth for comparison (measured cycles). Second, we performed our AIDG fixed point evaluation and built a refined roofline model for the parameterizable systolic array.
In the case of the divisible convolution, one can clearly see that with a wider memory interface the architecture is less memory bound and the number of estimated cycles reduces. Note that there is no change in runtime between a memory port width of 7 and 11 because for 12 weights that need to be loaded per column we still need two memory transactions with these port widths, which is the same as with a memory port width of 6.
Plasticine-derived Accelerator Design Space Exploration
Using an im2col transformation for convolutional layer we can execute those layers as tiled GEMM and map them onto the PCUs of the Plasticine-derived architecture, while fully-connected layers can be executed directly without a transformation. We implemented a DNN mapper that maximizes the amount of parallel GEMM and matrix additions using our parameterizable ACADL model. Employing our mapper, we mapped the DNNs TC-ResNet8, AlexNet, and EfficientNet. We conducted an extensive design space exploration for all three DNNs where the rows, columns, and PCU GEMM tile size are varied to find the architectural parameters that result in the lowest end-to-end latency of a given DNN.
Conclusion
This paper presented a fast and automatic approach for the generation of accurate performance models for DNN accelerator architectures based on the Abstract Computer Architecture Description Language (ACADL). Together with DNN layer mappings we construct and evaluate an Architectural Instruction Dependency Graph (AIDG) that allows us to evaluate, in the best case, only 154 loop kernel iterations to estimate the performance for 4.19 billion instructions. We evaluated our approach using four different accelerator architectures including UltraTrail, Gemmini, parameterizable systolic array, and Plasticine-derived. Those architectures are modeled on different abstraction levels going from fine-grained scalar operations up to fused tensor operations. We achieve better MAPE results than the state-of-the-art analytical latency estimators refined roofline and Timeloop and regression-based latency estimators without the need for creating a large training dataset.


