6 Hardware-Aware Execution

Wayne Luk, Ce Guo, Henning Funke, Jens Teubner, Erik Schultheis, Rohit Babbar, Helena Kotthaus, Peter MarwedelOpenalex Unknown 2022 · OpenAlex

Abstract

Efficient learning has been the focus of research for decades. Many studies explore various software/hardware techniques to improve the efficiency of the learning process while preserving the accuracy of the derived learning models. Along with the various demands of applications nowadays, from simple image recognition to advanced fundamental steering, how to deploy learned models and execute them efficiently has been of key interest in the industry. Considering various resource constraints such as throughput, timeliness, and energy consumption imposed by the targeted scenarios and the adopted hardware platforms, most machine learning techniques, which often rely on high-performance computers and clusters, must be carefully redesigned to fulfill the assigned missions at edge devices while addressing the efficiency of resource usage.

The Efficiency Gap

Most machine learning (ML) research focuses on algorithmic accuracy, often assuming a "black box" of high-performance computing. However, when these models are deployed on real-world hardware—such as edge devices, FPGAs, or modern multicore CPUs—they encounter significant resource constraints: power limits, memory bottlenecks, and under-utilized processing units.

A standard multi-layer neural network model, representing the high-level software structures that must be mapped to hardware.

This research addresses the "efficiency gap" that occurs when high-level software is not designed for low-level hardware realities. Specifically, the authors tackle four major challenges: the difficulty of implementing backpropagation on FPGAs, GPU thread divergence in database queries, memory bottlenecks in Extreme Multi-label Classification (XMC), and idle time in heterogeneous CPU scheduling.

Hardware-Aware Frameworks

FPGA-Based Backpropagation Engine

Unlike most FPGA projects that focus solely on inference, this engine handles the full training cycle. It utilizes multifunctional arithmetic blocks that can be dynamically switched between linear combinations and non-linear function evaluations via a command sequence. This approach avoids the slow process of hardware reconfiguration, allowing for flexible and fast training on reconfigurable hardware.

Architecture of the FPGA-based backpropagation engine featuring multifunctional arithmetic blocks and command-driven control.

DogQC (GPU Query Compiler)

To address GPU under-utilization, the authors introduced Lane Refill and Push-Down Parallelism. Lane Refill suspends "finished" threads into a buffer to keep the GPU "warp" full of active work, while Push-Down Parallelism spreads heavy individual tasks across multiple threads to prevent single-thread bottlenecks.

NUMA-Aware XMC

For extreme classification involving millions of labels, the researchers implemented two-level parallelization and data replication across NUMA (Non-Uniform Memory Access) domains. This prevents memory bus bottlenecks. Additionally, they introduced Mean-Separating Initialization (MSI) to jumpstart the training process, making the underlying Hessian calculations sparser and faster.

RAMBO (Resource-Aware MBO)

RAMBO is a framework for Model-Based Optimization that uses a "job utility estimator" to predict task duration. It employs a knapsack-based scheduler to map tasks to the most efficient available cores, specifically targeting heterogeneous architectures like ARM's big.LITTLE.

Key Results and Insights

The research demonstrates that tailoring algorithms to specific hardware quirks yields massive efficiency gains:

  • FPGA Training: Achieved a 5.2x speedup compared to a high-end 8-thread CPU running PyTorch.
  • GPU Queries: The DogQC compiler outperformed state-of-the-art systems by up to 86x on complex database benchmarks (TPC-H).
  • Extreme Classification: MSI provided a 150% to 500% speedup in training time across massive datasets like Amazon-670K.
  • Optimization: RAMBO consistently converged to optimal solutions faster than both synchronous and asynchronous parallel baselines.

A central insight of this work is that reusability and consolidation are vital. By designing hardware modules that perform multiple types of math without being "re-flashed" and by consolidating sparse work in GPU warps, the researchers turned hardware constraints into performance advantages.

Conclusion

While the frameworks show significant promise, limitations remain regarding physical DSP block scaling on FPGAs and the accuracy of runtime predictions in scheduling. Future work will continue to cross the boundaries between hardware theory and ML algorithm design to unlock further efficiencies at the edge.

Summary updated

Abstract

Efficient learning has been the focus of research for decades. Many studies explore various software/hardware techniques to improve the efficiency of learning process while preserving the accuracy of the derived learning models. Along with the various demands of applications nowadays, from simple like image recognition to advanced like fundamental steering, how to deploy learned models and execute them efficiently has been of key interests in the industry. Considering various resource constraints such as throughput, timeliness, and energy consumption imposed by the targeted scenarios and the adopted hardware platforms, most machine learning techniques, which often rely on high-performance computers and clusters, must be carefully redesigned to fulfill the assigned missions at edge devices while addressing the efficiency of resource usage.
BibTeX
@inproceedings{luk2022hardware,
  author = {Wayne Luk and Ce Guo and Henning Funke and Jens Teubner and Erik Schultheis and Rohit Babbar and Helena Kotthaus and Peter Marwedel},
  title = {{6 Hardware-Aware Execution}},
  booktitle = {Openalex Unknown},
  year = {2022},
  doi = {10.1515/9783110785944-006},
}
Figure