Abstract: We present the implementation of a trust-region Newton algorithm, ExaTron, for bound-constrained nonlinear programming (NLP) problems, running entirely on multiple GPUs. By eliminating data transfers between the CPU and GPU, our implementation removes a major performance bottleneck in memory-bound scenarios, particularly when solving many small problems in batch. We discuss design principles and implementation details for our kernel function and core operations, justifying design choices through numerical experiments. Using the application of distributed control for alternating current optimal power flow (ACOPF), we demonstrate ExaTron's performance on the Summit supercomputer. Our results show linear scaling with respect to batch size and the number of GPUs, achieving more than a 35x speedup on 6 GPUs compared to 40 CPUs on a single node.
Introduction
Large-scale optimization challenges, such as managing a national electric grid, are often tackled using Lagrangian decomposition. This method breaks a massive, monolithic problem into thousands of independent, smaller nonlinear subproblems. While GPUs are ideal for parallel tasks, traditional "hybrid" solvers often struggle with this workflow because they offload math to the GPU while keeping control logic on the CPU. This creates a massive bottleneck as data must constantly travel across the slow PCIe bus. For thousands of small problems, this transfer time often exceeds the actual computation time.
The ExaTron Solver
To eliminate this bottleneck, we developed ExaTron, a solver that lives entirely on the GPU. By avoiding the CPU-GPU "ping-pong" effect, the solver maintains high data locality within the GPU's high-bandwidth memory hierarchy.
Key technical features of ExaTron include:
- Single-Kernel Design: Instead of launching multiple small kernels, ExaTron uses a single massive kernel to handle the entire optimization loop for a batch of problems, minimizing overhead.
- Dense Math in Shared Memory: For subproblems with fewer than 32 variables, the overhead of sparse data structures is prohibitive. ExaTron performs full, dense Cholesky factorization within the GPU's ultra-fast shared memory.
- Julia Implementation: The solver is implemented in Julia using
CUDA.jl, achieving high performance while maintaining code readability.
Threading Strategy: 1D vs. 2D
A critical design choice in ExaTron is the thread configuration. We compared a 1D warp configuration (assigning one 32-thread warp to each problem) against a 2D configuration (mapping threads to matrix elements).
As shown in the figure above, the 2D configuration becomes significantly slower as the number of variables increases, reaching up to a 9x performance penalty. This is primarily due to synchronization overhead and idle threads in the 2D mapping for small-scale problems. Consequently, ExaTron utilizes a 1D configuration for problems with 32 variables or fewer.
Results and Scaling
We evaluated ExaTron using the ACOPF problem with standard MATPOWER and PGLIB benchmarks. In our largest test case, the solver handled 34,704 nonlinear subproblems per iteration.
On a single Summit node, 6 GPUs outperformed 40 CPU cores by a factor of 9x to 35x. Furthermore, the solver scales linearly with both the batch size and the number of GPUs. This efficiency allows ExaTron to solve massive batches of problems in just a few milliseconds, meeting the requirements for real-time grid control.
Limitations and Future Work
While ExaTron provides significant speedups, load imbalance remains a challenge. Because the GPU processes problems in batches, the system must wait for the slowest "straggler" in a batch to finish, leading to tail latency. Future research will investigate asynchronous algorithms to allow GPUs to continue working on new problems without waiting for the slowest subproblems to conclude.
Summary updated