This paper, titled "Accelerating 128-bit Floating-Point Matrix Multiplication on FPGAs," presents a high-performance hardware accelerator for quadruple-precision arithmetic. By leveraging the reconfigurable nature of FPGAs, the authors provide a massive speedup for numerically sensitive scientific computations that are typically crippled by software emulation on standard CPUs.
TL;DR
The researchers developed a custom 128-bit (binary128) General Matrix Multiplication (GEMM) engine on Intel FPGAs using a systolic array architecture. Their design achieves up to 90.9 GFlops on high-end hardware—a staggering 147x speedup over a 20-threaded modern CPU—enabling the practical use of ultra-high precision in complex solvers like Semidefinite Programming (SDP).
What Problem Does This Paper Address?
In the world of high-performance computing, 32-bit (single) and 64-bit (double) precision are the standard. However, certain "stiff" mathematical problems, such as Semidefinite Programming (SDP) and specific LU decompositions, become numerically unstable as they approach an optimal solution. To maintain accuracy, these applications require 128-bit "quadruple" precision (binary128).
The challenge is that almost no modern commodity processors (CPUs or GPUs) support 128-bit math in hardware. Instead, they rely on software emulation, which is often 100x to 1000x slower than standard double-precision math. This makes high-precision scientific modeling prohibitively expensive. The authors tackle this by using Field-Programmable Gate Arrays (FPGAs) to build the specific hardware logic needed for 128-bit math from the ground up.
Methods
The authors utilized Intel’s OpenCL-based High-Level Synthesis (HLS) to design their accelerator. Key components of their approach include:
- Systolic Array Architecture: They implemented a 2D grid of Processing Elements (PEs). In this design, data flows through the grid (horizontally and vertically), allowing each piece of data to be reused multiple times, which significantly reduces the pressure on external memory bandwidth.
- Custom FP Units: Since standard OpenCL doesn't support binary128, they integrated specialized floating-point units for addition and multiplication tailored for the 128-bit format.
- Memory Tiling: To mitigate the massive bandwidth requirements of 128-bit numbers (each number is 16 bytes), they implemented a "memory tile" (local cache) within the FPGA to store sub-matrices, ensuring the compute units aren't left idling while waiting for data from DRAM.
- Library Integration: They designed an API compatible with the standard
Rgemmroutine from MPLAPACK, making their hardware a "drop-in" accelerator for existing scientific software.
Datasets
The authors evaluated their design using several benchmarks:
- Synthetic Benchmarks: Square and rectangular matrix multiplications with sizes ($n$) ranging from 64 up to 24,576.
- SDPLIB: A standard library of 92 real-world problems for Semidefinite Programming.
- Numerical Applications: They specifically tested the performance of Blocked LU Decomposition and the Primal-Dual Interior-Point Method (PDIPM) used in SDP solvers.
Key Insights and Ideas
- The Precision-Flexibility Trade-off: While GPUs are faster for standard 32/64-bit math, their fixed-function hardware makes them inefficient for non-standard bit-widths. FPGAs excel here because the "hardware" can be reshaped to fit the 128-bit requirement perfectly.
- Bandwidth is the Bottleneck: Moving 128-bit data is expensive. The authors found that for an $8 \times 8$ PE array, the required bandwidth was 51.2 GB/s—exceeding the capacity of older FPGA boards (like the Arria10). This highlighted that local on-chip memory management is more critical than raw compute logic.
- The "Trench" Effect: They identified specific matrix sizes (e.g., $n=16384$) where performance dropped due to memory bank conflicts on the FPGA board. Increasing the internal buffer size (
MTile) from 128 to 512 helped "smooth out" these performance dips. - CPU Latency vs. FPGA Throughput: CPUs still win for very small matrices due to lower startup latency. However, once the matrix size exceeds roughly $n=1536$, the FPGA’s pipelined throughput takes over and leaves the CPU in the dust.
Key Results
- Peak Performance: Achieved 90.9 GFlops on the Intel Agilex FPGA using an $8 \times 16$ systolic array.
- Raw Speedup: For large matrices, the Agilex FPGA was 147x faster than an Intel i9-10900 CPU (running 20 threads via OpenMP).
- Application Acceleration:
- LU Decomposition: Up to 5.3x faster than the CPU.
- SDP Solver: Up to 2x faster for the entire iteration process in selected SDPLIB problems.
- Numerical Accuracy: The FPGA implementation matched the reference software (MPLAPACK) with an L1 norm error between $10^{-28}$ and $10^{-31}$, proving that the hardware acceleration did not sacrifice precision.
Limitations and Future Work
- Non-Square Matrices: The current systolic array is highly optimized for square matrices. Performance degrades significantly for "tall-skinny" matrices (where one dimension is much smaller than the others), which are common in certain phases of SDP algorithms.
- Resource Limits: The authors were unable to implement a $16 \times 16$ array because it exceeded the available logic cells on current high-end FPGAs.
- Future Scope: The authors plan to extend this work to even higher precisions (such as Double-Double or Quad-Double) and to develop a "batched" GEMM API to better handle the smaller, non-square matrices where the current design struggles.
Summary updated