Skip to main content
QUICK REVIEW

[Paper Review] CHARM: Composing Heterogeneous Accelerators for Matrix Multiply on Versal ACAP Architecture

Jinming Zhuang, Jason Lau|arXiv (Cornell University)|Jan 6, 2023
Parallel Computing and Optimization TechniquesComputer Science7 citations
TL;DR

CHARM designs and automatically composes multiple heterogeneous MM accelerators on AMD/Xilinx Versal ACAP to support both large and small matrix multiplies, achieving significant end-to-end throughput gains over a monolithic accelerator.

ABSTRACT

Dense matrix multiply (MM) serves as one of the most heavily used kernels in deep learning applications. To cope with the high computation demands of these applications, heterogeneous architectures featuring both FPGA and dedicated ASIC accelerators have emerged as promising platforms. For example, the AMD/Xilinx Versal ACAP architecture combines general-purpose CPU cores and programmable logic with AI Engine processors optimized for AI/ML. With 400 AIEs, it provides up to 6.4 TFLOPs performance for 32-bit floating-point data. However, machine learning models often contain both large and small MM operations. While large MM operations can be parallelized efficiently across many cores, small MM operations typically cannot. We observe that executing some small MM layers from the BERT natural language processing model on a large, monolithic MM accelerator in Versal ACAP achieved less than 5% of the theoretical peak performance. Therefore, one key question arises: How can we design accelerators to fully use the abundant computation resources under limited communication bandwidth for applications with multiple MM layers of diverse sizes? We identify the biggest system throughput bottleneck resulting from the mismatch of massive computation resources of one monolithic accelerator and the various MM layers of small sizes in the application. To resolve this problem, we propose the CHARM framework to compose multiple diverse MM accelerator architectures working concurrently towards different layers in one application. We deploy the CHARM framework for four different applications, including BERT, ViT, NCF, MLP, on the AMD Versal ACAP VCK190 evaluation board. Our experiments show that we achieve 1.46 TFLOPs, 1.61 TFLOPs, 1.74 TFLOPs, and 2.94 TFLOPs inference throughput for BERT, ViT, NCF and MLP, which obtain 5.40x, 32.51x, 1.00x and 1.00x throughput gains compared to one monolithic accelerator.

Motivation & Objective

  • Motivate the need for efficient MM across layers of varying sizes in DL models like BERT, ViT, NCF, and MLP.
  • Develop a framework to partition resources and compose diverse accelerators that maximize overall throughput under bandwidth constraints.
  • Automate design space exploration, code generation, and runtime scheduling to support end-to-end DL workloads on Versal ACAP.
  • Demonstrate practical deployment and provide open-source tools for reproducibility on Versal hardware.

Proposed method

  • Propose CHARM architecture to compose multiple diverse MM accelerators and non-MM kernels on Versal ACAP with a dedicated runtime.
  • Develop CHARM framework comprising CDSE (designSpace exploration for a single accelerator), CDAC (diverse accelerator composer), CACG (auto code generation), and CRTS (runtime scheduler).
  • Use a two-step sort-based workload partitioning and resource partitioning algorithm to map MM kernels to diverse accelerators with optimized throughput.
  • Model data movement and computation to derive an optimization formulation that guides DSE and tiling choices (A,B,C,X,Y,Z).
  • Automate generation of AIE, PL, and host code and integrate with Versal tooling to produce end-to-end binaries.
  • Demonstrate on VCK190 board with BERT, ViT, NCF, and MLP, achieving multi-TFLOP throughput for each workload.

Experimental results

Research questions

  • RQ1How can we sustain high throughput when end-to-end DL models contain MM layers of widely varying sizes under limited off-chip bandwidth?
  • RQ2Can a composition of heterogeneous MM accelerators outperform a monolithic accelerator for real-world DL workloads like BERT and ViT?
  • RQ3What design space exploration, dataflow strategies, and automation are needed to efficiently partition resources and schedule diverse accelerators?
  • RQ4How can automatic code generation and runtime scheduling enable practical end-to-end deployment on Versal ACAP?

Key findings

  • CHARM achieves 1.46 TFLOPs (BERT), 1.61 TFLOPs (ViT), 1.74 TFLOPs (NCF), and 2.94 TFLOPs (MLP) inference throughput on VCK190.
  • Compared to a monolithic accelerator, CHARM provides throughput gains of 5.29× for BERT, 32.51× for ViT, and 1.00× for both NCF and MLP.
  • CHARM demonstrates superior utilization by allocating larger accelerators to large MM layers and smaller accelerators to small MM layers, reducing padding and data movement waste.
  • The framework automates design space exploration, code generation, and runtime scheduling, enabling end-to-end DL workloads with heterogeneous accelerators.
  • Authors provide open-source tools for Versal as white-box implementations to reproduce results.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.