GPU-Accelerated Sparse Linear Solver

GLU 3.0 Hybrid right-looking sparse LU factorization on the GPU

A CUDA-based parallel sparse LU solver built for circuit simulation. GLU 3.0 pairs one-time CPU symbolic analysis with massively parallel GPU numeric factorization — delivering up to 13× faster factorization than GLU 2.0.

CUDA / C++ pyglu Python API UC Riverside BSD 3-Clause
sparse_lu.mtx
L U
L factor U factor nonzeros
13.0×
Mean GPU speedup
over GLU 2.0
55.9×
Peak speedup on
large circuit matrices
3145×
Faster column
dependency detection
36.7M
Nonzeros factorized
(G3_circuit)
What is GLU?

Direct sparse solves at GPU speed, without sacrificing accuracy.

Circuit simulation, power-grid analysis, and other SPICE-class workloads repeatedly solve large, extremely sparse, asymmetric linear systems Ax = b. The LU factorization at their core is notoriously hard to parallelize.

GLU (GPU LU) solves this with a hybrid strategy: the sparsity structure is analyzed once on the CPU, then the numeric factorization runs level-by-level on the GPU, exploiting thousands of independent columns in parallel. Version 3.0 rethinks both the dependency analysis and the GPU kernel to push throughput far beyond earlier releases.

  • 01Right-looking, column-based factorizationReformulated as parallel submatrix updates — ideal for the GPU.
  • 02Level scheduling for parallelismIndependent columns are grouped into levels and factorized together.
  • 03NICSLU-powered preprocessingAMD reordering & MC64 scaling keep fill-in low and pivots stable.
solve.sh shell
# Build the solver
cd src/ && make MAIN

# Factorize & solve a Matrix Market system
# (RHS defaults to b = [1, 1, ..., 1])
./lu_cmd -i circuit.mtx

# Near-singular? enable diagonal perturbation
./lu_cmd -i circuit.mtx -p

# → solution written to x.dat
Why GLU 3.0

Engineered for the hardest sparse systems

Every stage of the pipeline is tuned for the irregular sparsity and steep dependency chains of real circuit matrices.

Relaxed "double-U" dependency detection

A new sufficient-condition algorithm finds column dependencies with just two loops instead of three — running orders of magnitude faster than GLU 2.0 while preserving correctness.

Dynamic GPU kernel

Three computing modes adapt on the fly to each level's shape — from many small blocks to full 32-warp blocks to per-column CUDA streams — keeping the device saturated end to end.

Hybrid CPU + GPU pipeline

Symbolic analysis runs once on the CPU; the expensive numeric factorization runs on the GPU. Ideal for Newton–Raphson loops that refactorize the same structure repeatedly.

Level-scheduled parallelism

Columns are partitioned into dependency levels; every column in a level is independent and factorized concurrently across the GPU's streaming multiprocessors.

Python bindings (pyglu)

A drop-in scipy.sparse.linalg-style API — splu and spsolve — accepting any SciPy sparse matrix. Factorize once, solve many.

Algorithm-based fault tolerance

Optional ABFT checks verify column checksums and LU correctness on-device — useful for validating results on long-running or unreliable GPU hardware.

Benchmarks

Measured, matrix by matrix

GLU 3.0 was evaluated on standard circuit matrices, from small nets to the 1.5-million-row G3_circuit. The bigger and denser the problem, the larger the win.

13.0×
arithmetic-mean GPU kernel speedup over GLU 2.0 across the full benchmark set (6.7× geometric mean).
7.1×
arithmetic-mean speedup over the recent enhanced GLU 2.0 of Lee et al. (TVLSI '18).
3145×
geometric-mean speedup of the new column-dependency detection — up to 49,847× on ASIC_680ks.
GPU factorization speedup vs. GLU 2.0
Higher is better. Representative circuit matrices, sorted by speedup.
Source: S. Peng & S. X.-D. Tan, "GLU3.0" (Table I). Single-precision GPU factorization time. Full 14-matrix table and hardware details in the paper.
How it works

A three-phase pipeline

The costly structural analysis happens once on the CPU. Only the numeric factorization touches the GPU — so it can be repeated cheaply across simulation iterations.

1 PREPROCESS

Reorder & scale

CPU
  • Read Matrix Market (.mtx) via NICSLU
  • AMD reordering to minimize fill-in
  • MC64 row/column scaling for stable pivots
  • Emit matrix in CSC format
2 SYMBOLIC

Analyze structure

CPU · once
  • Fill-in prediction (symbolic factorization)
  • CSC → CSR transpose + diagonal pointers
  • Relaxed double-U dependency detection
  • Level scheduling for GPU parallelism
3 NUMERIC

Factorize on GPU

GPU
  • Level-by-level right-looking updates
  • 16 CUDA streams, asynchronous columns
  • Dynamic kernel: small / large / stream modes
  • In-place L·U → forward/back substitution
The GPU kernel

One kernel, three modes — sized to the work.

Across the levels of a factorization, the amount of parallel work swings wildly: early levels have thousands of tiny columns, later levels have a handful of very wide ones. A single fixed kernel wastes the GPU on one end or the other.

GLU 3.0 introduces dynamic resource allocation. Based on each level's size and its sub-column profile, it dispatches one of three kernel modes so the device stays fully occupied from the first level to the last.

A

Small-block mode

One warp per sub-column, a few warps per block, many blocks launched — perfect for wide levels with thousands of small columns.

B

Large-block mode

Still one warp per sub-column, but 32 warps packed into each block and fewer blocks — for the mid-range levels.

C

Stream mode

One block per sub-column dispatched across CUDA streams — concurrency for the deep, narrow tail of the dependency graph.

Quick start

Run it from the shell or from Python

Use the lu_cmd command-line tool, or drop pyglu into an existing SciPy workflow.

command line bash
# Requirements: NVIDIA CUDA Toolkit, g++
cd src/
make MAIN            # builds ./lu_cmd

# Solve with static pivoting (GESP)
./lu_cmd -i matrix.mtx

# Or with diagonal perturbation
./lu_cmd -i matrix.mtx -p

# Solution vector → x.dat
pyglu_example.py python
import scipy.sparse as sp
import numpy as np
import pyglu

A = sp.random(1000, 1000, density=0.01,
              format='csc') + sp.eye(1000)
b = np.ones(1000)

# Factorize once, solve many times
lu = pyglu.splu(A)
x1 = lu.solve(b)
x2 = lu.solve(np.random.rand(1000))

# …or one-shot solve
x  = pyglu.spsolve(A, b)
Install the Python package: pip install pybind11 && pip install -e . --no-build-isolation
Where it's used

Built for EDA-scale workloads

Circuit simulation

The linear solve at the heart of every SPICE transient and DC step.

Power-grid analysis

Large, sparse conductance matrices from on-chip power delivery networks.

VLSI & EDA tooling

A GPU backend for design-automation flows that refactorize repeatedly.

Scientific computing

Any workload dominated by repeated sparse direct solves of the same pattern.

Research

Publications & citation

GLU is developed in the VSCLAB group at UC Riverside and described in these peer-reviewed papers.

J2
GLU3.0: Fast GPU-based Parallel Sparse LU Factorization for Circuit Simulation
S. Peng and S. X.-D. Tan · IEEE Design & Test, 2020 · arXiv:1908.00204
J1
GPU-Accelerated Parallel Sparse LU Factorization Method for Fast Circuit Analysis
K. He, S. X.-D. Tan, H. Wang and G. Shi · IEEE Trans. VLSI Systems, vol. 24, no. 3, pp. 1140–1150, Mar. 2016
citation.bib bibtex
@article{peng2020glu3,
  title   = {GLU3.0: Fast GPU-based Parallel
             Sparse LU Factorization for
             Circuit Simulation},
  author  = {Peng, Shaoyi and Tan,
             Sheldon X.-D.},
  journal = {IEEE Design & Test},
  year    = {2020},
  note    = {arXiv:1908.00204}
}

Bring GPU LU factorization to your simulator

GLU 3.0 is open source under the BSD 3-Clause license. Clone it, build it, and cite the paper.

SP
Shaoyi Peng
UC Riverside
KH
Kai He
UC Riverside
ST
Prof. Sheldon X.-D. Tan
UC Riverside · ECE