A GPU-resident Memory-Aware Algorithm for Accelerating Bidiagonalization of Banded Matrices

Evelyne Ringoot, Rabab Alomairy, Alan EdelmanarXiv 2025 · DOI

Abstract

Singular Value Decomposition (SVD) is a fundamental operation in scientific computing and machine learning. While most stages of the SVD pipeline are well-optimized for GPUs, the reduction of banded matrices to bidiagonal form—a process known as bulge-chasing—has remained a significant bottleneck due to its memory-bound nature. This paper presents the first fully GPU-resident algorithm for this task. By employing a novel bandwidth-tiling strategy and a cache-aware parallel bulge-chasing approach, the proposed method achieves 10–100× speedups over state-of-the-art CPU libraries. The implementation is hardware-agnostic, demonstrating high performance across NVIDIA, AMD, Intel, and Apple GPUs.

Introduction

The Singular Value Decomposition (SVD) is essential for applications ranging from quantum information processing to the fine-tuning of Large Language Models via Low-Rank Adaptation (LoRA). On modern high-performance hardware, SVD is typically computed in three stages: (1) reduction from a dense matrix to a banded matrix, (2) reduction from banded to bidiagonal form, and (3) final diagonalization.

While stages 1 and 3 are highly parallelizable and well-suited for GPU architectures, stage 2—banded to bidiagonal reduction—has traditionally been considered "unsuitable" for GPUs. This stage involves fine-grained, memory-intensive operations with low arithmetic intensity. Consequently, existing libraries often offload this step to the CPU, leading to substantial data-transfer overheads that negate the benefits of GPU acceleration.

Methods

The proposed algorithm addresses these challenges by treating the GPU memory hierarchy as a primary design constraint. The implementation, developed in Julia using KernelAbstractions.jl, introduces several key innovations:

Successive Bandwidth Reduction (Tiling)

Instead of attempting to reduce the entire matrix bandwidth in a single pass, the algorithm employs a tiling strategy. By splitting the work into "Inner Tilewidths" (TW), the algorithm ensures that the active "working set" of data fits within the L1 and L2 caches. This significantly reduces high-latency DRAM accesses.

Successive bandwidth reduction using a tiling strategy to fit the working set into GPU caches.

Parallel Bulge-Chasing

To maximize the utilization of the GPU's massive thread count, the algorithm adapts parallel strategies typically used on CPUs. A "three-cycle separation" rule is enforced to allow multiple rows to be processed concurrently without data hazards. The workload is distributed such that threads within a block jointly calculate Householder transformations (HH) and then loop over chunks of rows to process the matrix.

Parallel bulge-chasing implementation showing row sweeps and thread-level work distribution.

Hardware-Agnostic Design and Tuning

By leveraging the Julia ecosystem, the algorithm maintains a single codebase that compiles to optimized machine code for various vendors (e.g., PTX for NVIDIA, GCN for AMD). Performance is further optimized through a model that tunes three critical hyperparameters: Threads per Block (TPB), Inner Tilewidth (TW), and the maximum number of active blocks.

Results and Discussion

The algorithm was evaluated on synthetic matrices ranging from $1024 \times 1024$ to $32k \times 32k$, with bandwidths from 32 to 512. Benchmarks were conducted across a diverse set of hardware, including NVIDIA H100/A100, AMD MI300X/MI250X, Intel PVC Max 1100, and Apple M1.

Performance and Scaling

The GPU implementation demonstrated exceptional performance, outperforming multithreaded CPU libraries such as PLASMA and SLATE by over 100× on $32k \times 32k$ matrices. Performance scaled linearly with matrix bandwidth, a significant improvement over previous methods that struggled with "thicker" bands.

Cache and Occupancy Insights

A key finding is that total memory throughput (including L1/L2 caches) is a better predictor of performance for these kernels than raw DRAM bandwidth. For instance, an Inner Tilewidth of 32 was found to be optimal for FP32 on NVIDIA H100 because it aligns perfectly with a 128-byte cache line. Furthermore, the study observed that high register usage, which limits GPU occupancy, can actually improve performance by reducing cache contention. This suggests that "maximum occupancy" is not always the optimal goal for memory-bound linear algebra kernels.

Numerical Stability

Evaluation across FP16, FP32, and FP64 precisions confirmed that the algorithm maintains high numerical fidelity. In FP64 tests, errors remained near machine epsilon, ensuring suitability for rigorous scientific applications.

Conclusion and Future Work

This work demonstrates that the bidiagonalization of banded matrices can be efficiently executed on GPUs by prioritizing cache-aware data movement and parallel bulge-chasing strategies. Future efforts will focus on extending the algorithm to compute singular vectors (the back-transformation step) and integrating auto-tuning frameworks to automatically optimize hyperparameters for new hardware architectures. The ultimate goal is a fully GPU-resident SVD pipeline that eliminates all CPU-GPU communication overhead.

Summary updated

BibTeX
@misc{ringoot2025gpu,
  author = {Evelyne Ringoot and Rabab Alomairy and Alan Edelman},
  title = {{A GPU-resident Memory-Aware Algorithm for Accelerating Bidiagonalization of Banded Matrices}},
  year = {2025},
  eprint = {2510.12705},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.12705},
}
Figure