Skip to main content
QUICK REVIEW

[논문 리뷰] CHARM: Composing Heterogeneous Accelerators for Matrix Multiply on Versal ACAP Architecture

Jinming Zhuang, Jason Lau|arXiv (Cornell University)|2023. 01. 06.
Parallel Computing and Optimization TechniquesComputer Science인용 수 7
한 줄 요약

CHARM은 AMD/Xilinx Versal ACAP에서 여러 이질적인 MM 가속기를 자동으로 구성하여 대형 및 소형 행렬 곱을 모두 지원하며, 모놀리식 가속기에 비해 엔드투엔드 처리량이 크게 향상됩니다.

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.

연구 동기 및 목표

  • BERT, ViT, NCF, MLP와 같은 DL 모델의 서로 다른 크기의 계층 전반에 걸친 효율적인 MM의 필요성을 동기 부여한다.
  • 대역폭 제약 하에서 전체 처리량을 극대화하도록 자원을 분할하고 다양한 가속기를 구성하는 프레임워크를 개발한다.
  • Versal ACAP에서 엔드투엔드 DL 워크로드를 지원하기 위한 설계 공간 탐색, 코드 생성 및 런타임 스케줄링을 자동화한다.
  • 실제 배치를 시연하고 Versal 하드웨어에서 재현성을 위한 오픈 소스 도구를 제공한다.

제안 방법

  • 전용 런타임을 갖춘 Versal ACAP에서 여러 이질적인 MM 가속기와 비-MM 커널을 구성하기 위한 CHARM 아키텍처를 제안한다.
  • CDSE(단일 가속기에 대한 설계 공간 탐색), CDAC(다양한 가속기 구성기), CACG(자동 코드 생성), CRTS(런타임 스케줄러)로 구성된 CHARM 프레임워크를 개발한다.
  • 해당 MM 커널을 다양한 가속기에 매핑하고 최적 처리량을 얻기 위한 두 단계 정렬 기반 워크로드 분할 및 자원 분할 알고리즘을 사용한다.
  • 데이터 이동과 계산을 모델링하여 DSE와 타일링 선택(A,B,C,X,Y,Z)을 안내하는 최적화 형태를 도출한다.
  • AIE, PL, 호스트 코드의 생성을 자동화하고 Versal 도구와 통합하여 엔드투엔드 바이너리를 생성한다.
  • VCK190 보드에서 BERT, ViT, NCF, MLP를 사용하여 각 워크로드에 대해 다중 TFLOP 처리량을 달성하는 것을 시연한다.

실험 결과

연구 질문

  • RQ1제한된 칩 외 대역폭(off-chip bandwidth)에서 엔드투엔드 DL 모델이 크게 다양한 크기의 MM 계층을 포함할 때 높은 처리량을 어떻게 유지할 수 있는가?
  • RQ2BERT와 ViT 같은 실제 DL 워크로드에 대해 이질적인 MM 가속기의 구성이 모놀리식 가속기보다 성능을 초과할 수 있는가?
  • RQ3자원을 효율적으로 분할하고 다양한 가속기를 스케줄하기 위해 어떤 설계 공간 탐색, 데이터 흐름 전략 및 자동화가 필요한가?
  • RQ4자동 코드 생성과 런타임 스케줄링이 Versal ACAP에서 실용적인 엔드투엔드 배치를 어떻게 가능하게 하는가?

주요 결과

  • CHARM은 VCK190에서 1.46 TFLOPs(BERT), 1.61 TFLOPs(ViT), 1.74 TFLOPs(NCF), 2.94 TFLOPs(MLP) 추론 처리량을 달성한다.
  • 모놀리식 가속기에 비해 CHARM은 BERT에서 5.29×, ViT에서 32.51×, NCF와 MLP에서 각각 1.00×의 처리량 향상을 제공합니다.
  • CHARM은 큰 MM 계층에는 더 큰 가속기를, 작은 MM 계층에는 더 작은 가속기를 할당하여 활용도를 높이고 패딩 및 데이터 이동 낭비를 줄인다.
  • 프레임워크는 설계 공간 탐색, 코드 생성 및 런타임 스케줄링을 자동화하여 이질적인 가속기를 갖춘 엔드투엔드 DL 워크로드를 가능하게 한다.
  • 저자들은 결과 재현을 위한 Versal용 화이트박스 구현으로 오픈소스 도구를 제공한다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.