A Browser-Native WebGPU Transient Circuit Solver with FP32 Krylov Solves and FP64 Residual Refinement: Progress Report, Reproducible Comparisons with ngspice and SciPy, and Measured Convergence and Performance on an NVIDIA Tesla T4
This technical report describes an open, browser-native transient simulator for linear RLC circuits. Its linear solves run as WGSL compute shaders through WebGPU. Because WGSL has no 64-bit floats, each step runs a Jacobi-preconditioned CG solve in FP32 and corrects it with FP64 host residuals (mixed-precision iterative refinement). We compare it with ngspice-41 and a SciPy FP64 sparse-LU reference on the same grid, using real runs on an NVIDIA Tesla T4 (Colab, driver 580.82.07, Node/Dawn on Vulkan, isFallbackAdapter=false). Pure FP32 gave 81-391 µV decision errors (up to 16.5 LSB) on 12/16-bit SAR capacitive-DAC netlists. One refinement pass with residual scaling gave ≤0.15 µV; two scaled passes gave ≤2.4e-6 µV. Unscaled refinement produced non-finite values in 3 of 4 cases. At n ≤ 4001 the T4 is latency-bound (~101 µs per round trip) and was 2.3-12.5× slower than SciPy on the same CPU. CPU-emulation (SwiftShader) results are labelled as such. This report is not peer-reviewed and was drafted with AI assistance; all numbers come from archived measurement files.
Authors
- I-Wei Tseng
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-22
- DOI
- https://doi.org/10.5281/zenodo.24433565
- Citations
- 5
- Primary Topic
- Matrix Theory and Algorithms
- Type
- preprint