🤖 AI Summary
This work addresses the challenge of efficiently solving nonlinear optimization problems on GPUs, particularly in robotics and related domains. It introduces a novel approach that integrates symbolic programming with high-performance GPU computing. Leveraging the SymForce library, the system is the first to automatically compile symbolic expressions involving Lie group operations into customized CUDA kernels. An adaptive reordering strategy is further incorporated to enhance memory efficiency. Users need only define symbolic residual functions to trigger fully automated generation of highly optimized GPU code. Evaluated on bundle adjustment tasks using the BAL dataset, the proposed method achieves 5–20× speedups over the current state-of-the-art while reducing memory consumption and maintaining comparable numerical accuracy.
📝 Abstract
We present Caspar, a library that makes the power of modern GPUs more accessible in robotics and provides a state-of-the-art nonlinear GPU solver that can be applied to a wide range of different optimization problems. Caspar bridges the gap between expressive symbolic programming in Python and high-performance GPU runtimes in C++ by automatically generating optimized CUDA kernels from symbolic expressions. Building on the SymForce library, users can easily define and combine symbolic expressions, including Lie group operations, to generate custom CUDA kernels. To use Caspar as a solver, users need only define the symbolic residual functions; Caspar then uses symbolic differentiation to generate the necessary GPU kernels and interfaces to perform nonlinear optimization.
In this paper, we present the core components of Caspar and showcase its performance by performing bundle adjustment on the Bundle Adjustment in the Large (BAL) dataset. We benchmark Caspar against other state-of-the-art bundle adjusters and show that it is 5 to 20 times faster than the best alternative, requires less memory, and achieves similar accuracy. This illustrates the benefit of our symbolic GPU programming approach. Caspar is released as part of SymForce and is freely available at https://github.com/symforce-org/symforce