torch-sla: Differentiable Sparse Linear Algebra with Adjoint Solvers and Sparse Tensor Parallelism for PyTorch
Mingyuan Chi
Code Available — Be the first to reproduce this paper.
ReproduceCode
- github.com/walkerchi/torch-slaOfficialIn paper★ 31
Abstract
Industrial scientific computing predominantly uses sparse matrices to represent unstructured data -- finite element meshes, graphs, point clouds. We present , an open-source PyTorch library that enables GPU-accelerated, scalable, and differentiable sparse linear algebra. The library addresses three fundamental challenges: (1) GPU acceleration for sparse linear solves, nonlinear solves (Newton, Picard, Anderson), and eigenvalue computation; (2) Multi-GPU scaling via domain decomposition with halo exchange, reaching 400 million DOF linear solve on 3 GPUs; and (3) Adjoint-based differentiation achieving O(1) computational graph nodes (for autograd) and O(nnz) memory -- independent of solver iterations. supports multiple backends (SciPy, cuDSS, PyTorch-native) and seamlessly integrates with PyTorch autograd for end-to-end differentiable simulations. Code is available at https://github.com/walkerchi/torch-sla.