Skip to main content
QUICK REVIEW

[Paper Review] Optimized implementation of the conjugate gradient algorithm for FPGA-based platforms using the Dirac-Wilson operator as an example

G. Korcyl, Piotr Korcyl|arXiv (Cornell University)|Jan 15, 2020
Quantum Computing Algorithms and ArchitectureComputer Science6 references6 citations
TL;DR

This paper presents an optimized FPGA implementation of the Conjugate Gradient (CG) algorithm using the Dirac-Wilson operator as a complex, sparse linear system representative in lattice QCD simulations. Implemented in OpenCL and C++ on Xilinx U280, the kernel achieves 607 GFLOPS at 300 MHz with hidden data transfers and pipelined memory access, demonstrating a highly efficient, reusable framework for HPC applications on FPGA accelerators.

ABSTRACT

It is now a noticeable trend in High Performance Computing that the systems are becoming more and more heterogeneous. Compute nodes with a host CPU are being equipped with accelerators, the latter being a GPU or FPGA cards or both. In many cases at the heart of scientific applications running on such systems are iterative linear solvers. In this work we present a software package which includes an FPGA implementation of the Conjugate Gradient algorithm using a particular problem of the Dirac-Wilson operator as encountered in numerical simulations of Quantum Chromodynamics. The software is written in OpenCL and C++ and is optimized for maximal performance. Our framework allows for a simple implementation of other linear operators, while keeping the data transport mechanisms unaltered. Hence, our software can serve as a backbone for many applications which are expected to gain a significant boost factor on FPGA accelerators. As such systems are expected to become more and more widespread, the need for highly performant FPGA implementations of the Conjugate Gradient algorithm and its variants will certainly increase and the porting investment can be greatly facilitated by the attached code.

Motivation & Objective

  • To develop a high-performance, reusable FPGA implementation of the Conjugate Gradient algorithm for heterogeneous HPC systems.
  • To address the challenge of porting iterative linear solvers to FPGA accelerators with minimal code changes for new operators.
  • To maximize compute utilization and minimize data movement in FPGA-based CG solvers using advanced memory and kernel optimization techniques.
  • To provide a production-ready software stack that can serve as a backbone for HPC applications and HPCG benchmarking on FPGA-accelerated systems.
  • To demonstrate that FPGAs can outperform CPUs and GPUs in specific HPC workloads involving sparse, structured linear systems.

Proposed method

  • The CG algorithm is implemented in OpenCL and C++ targeting Xilinx Alveo U280 FPGA, using a two-precision floating-point variant for performance.
  • The kernel is configured with an initiation interval of 2 clock cycles and runs at 300 MHz to maximize throughput.
  • Cyclic buffers are employed to enable overlapping of data transfers and kernel computation, hiding memory latency.
  • Three high-bandwidth memory (HBM) channels stream input data into the FPGA, while a single HBM3 channel returns results, enabling continuous operation.
  • Custom data types and streamlined memory access patterns are used to handle the 4D grid-based Dirac-Wilson operator with complex matrix entries per stencil.
  • The design uses non-blocking host synchronization and ensures all data transfers are overlapped with computation to maximize resource utilization.

Experimental results

Research questions

  • RQ1Can an FPGA-based CG implementation achieve performance levels competitive with modern CPUs and GPUs for large, sparse linear systems?
  • RQ2How can data movement and kernel execution be effectively overlapped to maximize FPGA utilization in iterative solvers?
  • RQ3To what extent can the CG kernel be abstracted to support different linear operators without re-architecting the core logic?
  • RQ4What performance gains are achievable using optimized memory access and pipelined data flow on FPGA hardware?
  • RQ5Can the proposed framework serve as a portable backbone for HPC applications and HPCG benchmarking on FPGA-accelerated systems?

Key findings

  • The FPGA implementation achieves a sustained performance of 607 GFLOPS on the Xilinx U280, surpassing 64-core Intel Xeon Phi and matching Nvidia V100 GPU performance for the same algorithm.
  • The kernel operates at a 2-cycle initiation interval with a clock frequency of 300 MHz, enabling high throughput and efficient resource utilization.
  • Data transfers are completely hidden behind computation through overlapping of input streaming and output return, ensuring uninterrupted kernel execution.
  • The framework supports reuse for other linear operators by preserving the same data transport and kernel interface, enabling rapid porting of new HPC applications.
  • The implementation demonstrates that FPGAs can deliver low-latency, deterministic communication and high arithmetic intensity, making them ideal for HPC workloads with complex memory access patterns.
  • The software package is production-ready, open-source under the GNU GPL, and includes documentation and support for integration into new HPC systems.

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.