MegBA: Distributed GPU Bundle Adjustment
- MegBA is a GPU-based distributed library designed to exactly solve large-scale bundle adjustment problems by partitioning computations across multiple GPUs and nodes.
- It integrates automatic edge-based problem partitioning with distributed preconditioned conjugate gradient and Schur elimination to maximize efficiency and scalability.
- MegBA supports high-precision mapping applications, such as city-scale autonomous driving and indoor AR, by overcoming the memory limits of CPU-only solvers.
MegBA is a GPU-based, distributed library designed to solve very large bundle adjustment (BA) problems exactly, matching the precision of classic single-node solvers but leveraging the aggregate memory and compute of multiple GPUs and nodes. It is especially targeted at reconstruction scenarios—such as city-scale mapping for autonomous driving or indoor mapping for AR—that produce BA instances with dataset sizes far exceeding the capabilities of CPU-only or single-GPU libraries. MegBA introduces a combination of automatic edge-based problem partitioning, distributed preconditioned conjugate gradient (PCG), distributed Schur elimination, and fully GPU-optimized kernels to achieve maximal scalability, efficiency, and solution accuracy (Ren et al., 2021).
1. Motivation and Rationale
Large-scale bundle adjustment involves the nonlinear refinement of camera parameters and 3D points by minimizing the sum of squared reprojection errors over millions to hundreds of millions of observations. Existing libraries such as Ceres and g2o are architected for single-node CPU environments. This leads to:
- Out-of-memory failures for problems that exceed a node's memory.
- Limited GPU acceleration, usually restricted to the linear solver without full GPU utilization for Jacobian or residual computation.
- Existing distributed or GPU-based approaches like RPBA, DPBA, PBA, and DeepLM either introduce solution-degrading approximations or incur significant inefficiencies due to frequent CPU–GPU data movement.
MegBA addresses these gaps with:
- Transparent distributed exact BA by partitioning the BA problem across multiple GPUs or nodes, with global memory aggregation.
- Exact, distributed PCG and Schur elimination solvers that guarantee solution equivalence to single-node methods.
- A fully GPU-accelerated end-to-end BA pipeline, including Jacobian computation, residual evaluation, system assembly, and iterative solver steps.
- Ceres/g2o-compatible APIs for seamless adoption in existing workflows (Ren et al., 2021).
2. System Design and Partitioning Strategy
MegBA represents the BA problem as a bip