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.
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.
# 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
Every stage of the pipeline is tuned for the irregular sparsity and steep dependency chains of real circuit matrices.
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.
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.
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.
Columns are partitioned into dependency levels; every column in a level is independent and factorized concurrently across the GPU's streaming multiprocessors.
A drop-in scipy.sparse.linalg-style API — splu and spsolve — accepting any SciPy sparse matrix. Factorize once, solve many.
Optional ABFT checks verify column checksums and LU correctness on-device — useful for validating results on long-running or unreliable GPU hardware.
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.
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.
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.
One warp per sub-column, a few warps per block, many blocks launched — perfect for wide levels with thousands of small columns.
Still one warp per sub-column, but 32 warps packed into each block and fewer blocks — for the mid-range levels.
One block per sub-column dispatched across CUDA streams — concurrency for the deep, narrow tail of the dependency graph.
Use the lu_cmd command-line tool, or drop pyglu into an existing SciPy workflow.
# 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
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)
pip install pybind11 && pip install -e . --no-build-isolation
The linear solve at the heart of every SPICE transient and DC step.
Large, sparse conductance matrices from on-chip power delivery networks.
A GPU backend for design-automation flows that refactorize repeatedly.
Any workload dominated by repeated sparse direct solves of the same pattern.
GLU is developed in the VSCLAB group at UC Riverside and described in these peer-reviewed papers.
@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}
}
GLU 3.0 is open source under the BSD 3-Clause license. Clone it, build it, and cite the paper.