Manuscript Offprint
arXiv:2610.41021CuPIQP: A Batched and Differentiable QP Solver on GPUs for Robot Learning and Control
Fenglong Song¹, Roland Schwan², Yuwen Chen¹, Yuning Jiang³ and Colin N. Jones¹
Abstract— Quadratic programs (QPs) are fundamental building blocks of many robotic tasks such as inverse kinematics, whole-body control, and model predictive control. Extending these methods to large-scale robot learning and control requires solving many QPs concurrently and, for end-to-end learning, differentiating through their solutions. Efficient batched optimization is therefore essential to bringing established model-based methods into GPU-based robotics pipelines. We present CuPIQP, a batched and differentiable QP solver on GPUs based on a proximal interior-point method, with unified support for dense, sparse, and multistage problems. The solver exploits parallelism across independent QPs and their internal structure while preserving per-problem numerical updates and termination decisions. Benchmarks with up to 16384 QPs per batch demonstrate solve-time speedups of up to 18.8× over MOREAU and 4.26× over eight-core PIQP. In an end-to-end learning task, CuPIQP accelerates training by 4.6× over QPAX and 7.8× over MOREAU. By reducing the computational cost, CuPIQP provides efficient, reusable infrastructure for integrating model-based optimization into large-scale robot learning and control.
I. INTRODUCTION
Quadratic programs lie on the critical path of many robot control tasks. QP solvers have traditionally been designed to minimize the online latency for solving one or a tiny batch of problems. Existing solvers such as QPOASES [1], OSQP [2], HPIPM [3], PROXQP [4] and PIQP [5] are highly effective under this execution model.
Nonetheless, an increasingly important class of robot learning and control workloads follows a different execution model, where optimization is embedded in an offline training pipeline and evaluated concurrently over a large number of instances [6]–[9]. In such workloads, the same optimization layer is applied across problem instances arising from parallel environments or sampled trajectories [10]. The resulting computational primitive is a batch of independent QPs , where the -th problem is given by
This work was supported by the Swiss National Science Foundation under the NCCR Automation project, grant agreement 51NF40.180545.
¹F. Song, Y. Chen and C. N. Jones are with the Automatic Control Laboratory, EPFL, Switzerland. {fenglong.song, yuwen.chen, colin.jones@epfl.ch
²R. Schwan is with the Accessible and Accelerated Robotics Lab, Dartmouth College, USA. roland.schwan@dartmouth.edu
³Y. Jiang is with the Institute for Transport Planning and Systems, ETH Zürich, Switzerland. yuning.jiang@ieee.org
where , , and . The dimensions , and , as well as the sparsity patterns of , , and , are shared across the batch, whereas the numerical values of the problem data may vary across instances. Consequently, the relevant objective is not only low latency for an individual QP, but also high throughput over the batch while preserving the solution and termination status of each problem. This highly concurrent workload is naturally well suited to execution on Graphics Processing Units (GPUs) because the independence of the QPs exposes abundant problem-level parallelism. The case for a GPU-native solver is further strengthened by data locality. In robot learning pipelines, QP data are often produced on the GPU by a policy, dynamics model, or simulator, and the solutions are immediately consumed there. A CPU solver introduces device–host transfers and host-side synchronization, interrupting device-resident execution and precluding end-to-end CUDA Graph capture across the solver boundary. A GPU-native batched solver instead keeps the complete optimization workflow on the device, avoiding these transfers and synchronization boundaries.
-
Batched solvers for general QP: Another class of solvers treats the batch as an explicit computational dimension for general QPs. QPTH [14] and QPAX [15] implement a differentiable interior-point method that solves batches of dense QPs concurrently on GPUs. MOREAU [16] is a differentiable solver for sparse conic optimization problems with shared sparsity pattern, providing both CPU and GPU backends. However, each solver is specialized for a single problem structure and does not provide unified support for dense, sparse, and multistage QPs.
-
Batched solvers for MPC: A complementary line of work exploits batching at the level of the complete nonlin-ear MPC pipeline. Recent GPU-based frameworks provide batched and differentiable sequential quadratic programming (SQP) implementations for large-batch MPC [17]–[20]. These frameworks generate a batch of structurally homogeneous QP subproblems at each SQP iteration, making an efficient batched QP solver a core primitive of the overall pipeline. On CPUs, ACADOS [21], [22] provides a batched and differentiable interface by parallelizing independent solves across multiple processor cores.
B. Contributions
We present CUPIQP as an open-source software . Its main technical contributions are summarized as follows:
-
Batch-native GPU execution. We design the solver around batches of independent QPs, exploiting problem-level parallelism for high throughput while retaining independent iterates, convergence decisions, solutions, and termination statuses for all problems in the batch.
-
Structure-specialized QP backends. CUPIQP supports dense, sparse, and multistage QPs through specialized data layouts and linear algebra backends under a unified solver interface, allowing users to exploit the structure of a variety of problem classes.
-
GPU-resident integration and differentiation. Problem data, solver iterates, per-problem statuses, and adjoint computations remain on the GPU. The solver interoperates directly with CUDA-resident arrays without host staging, provides implicit differentiation through a PyTorch interface, and supports CUDA Graph capture on compatible execution paths to reduce CPU orchestration and kernel-launch overhead.
Notation: and denote symmetric positive semi-definite and positive definite matrices. For a vector , , is the element-wise product, and are the -dimensional vector of zeros and ones, respectively. Subscript indexes the problem in the batch and the interior-point iteration.
II. PRELIMINARIES: PROXIMAL INTERIOR-POINT METHOD FOR A SINGLE QP
This section recalls the proximal interior-point method of PIQP [5] for a single QP. The batch index j is omitted for convenience.
A. Proximal Method of Multipliers
We introduce slack variables to rewrite the QP as
Its augmented Lagrangian with penalty parameter is
where and are the multipliers of the equality and inequality constraints. The proximal method of multipliers [23] iterates
with proximal weight . One interior-point iteration is applied to solve the subproblem (4a). Replacing by a logarithmic barrier gives, at iteration k with proximal centers ,
where is the barrier parameter and is the centering parameter defined below. With the auxiliary variables and , its first-order optimality conditions read
Applying Newton's method to (5) at the current iterate yields the linear system
where is the residual. The regularization terms and make nonsingular for any and any , including the rank-deficient constraint sets and singular task Jacobians that are common in practice.
Remark 1: When solving the KKT system (6), we never directly factorize the non-symmetric matrix . Eliminating yields the symmetric quasi-definite augmented system
with and , which admits an factorization. Alternatively, further eliminating gives the Schur complement system
where . The matrix admits a Cholesky factorization. We discuss the choice of factorization strategy in Sec. IV-C.
https://github.com/PREDICT-EPFL/cupiqp, BSD-2-Clause license.
B. Mehrotra Predictor-corrector
Each iteration solves (6) twice with the same factorization of [24]. The predictor solves (6) with for the affine direction and computes the fraction-to-the-boundary step lengths
(9)
with . The centering parameter follows from the predicted complementarity reduction,
(10)
The corrector sets and solves (6) again with the complementarity residual replaced by
giving and step lengths from (9) with replaced by . The iterate is updated as
\begin{align*}(x_{k+1},s_{k+1})&\leftarrow(x_{k},s_{k})+\alpha_{p}^{c}(\Delta x_{k}^{c},\Delta s_{k}^{c}),\ $ y_{k+1},z_{k+1})&\leftarrow(y_{k},z_{k})+\alpha_{d}^{c}(\Delta y_{k}^{c},\Delta z_{k}^{c}).\end{align*}(12)
C. Parameter Updates and Termination Criteria
After each step, the proximal centers and the parameters are updated as implemented in PIQP [5, Alg. 2]: the dual centers are moved to and is reduced aggressively only if the primal residual has decreased by a fixed factor, and otherwise is reduced more cautiously; the primal center and are treated in the same way based on the dual residual. Both parameters are bounded below by for numerical stability.
The termination is checked according to the absolute and relative residuals as follows:
(13)
and their problem-dependent scales
(14)
The solver terminates when
III. DIFFERENTIATION THROUGH QPS
For learning applications, we differentiate the primal–dual solution with respect to the QP data , aiming at computing . Let denote the optimality residual, obtained from (5) by setting and the complementarity target . Together with , the equation gives the KKT conditions for the QP (2). At a solution where is non-singular, the implicit function theorem gives
Notice that can be approximated by in (6) since they only differ by the regularization terms on the diagonal:
where are small at the final iteration. Additionally, the regularization terms ensure that is non-singular. Therefore, we approximate the solution sensitivity by
Let be a scalar loss that depends on through . Given the incoming gradient , its gradient w.r.t. is
where the adjoint variable is computed by solving
Remark 2: If factors corresponding to or at the same are available, they can be reused for the adjoint solve (20). Otherwise, must be refactorized during the backward pass.
By reading off the partition , the individual data gradients are
The expression for is symmetrized because P is parameterized as a symmetric matrix.
Remark 3: For sparse matrices with fixed sparsity patterns, the gradients with respect to P, A, and G are obtained by gathering the corresponding dense expressions in (21) only at their structural nonzeros.
IV. BATCHED GPU EXECUTION AND IMPLEMENTATION
The CUIQP solver executes the proximal interior-point method described in Section II through batched operations. The solver is implemented in Python and uses NVIDIA WARP [25] for managing device arrays and generating GPU kernels, with a shared iteration loop and dedicated linear algebra backends for dense, sparse, and multistage problems.
A. GPU-Resident Batch Execution and Termination Control
CUIQP is GPU-resident in both numerical data and iteration control. A batch consists of QPs with common dimensions and structural patterns but potentially different
The current sparse backend retains GPU-resident numerical data and computations, but limitations of CUDSS still require a host-side continuation check between iterations.
numerical data. Problem data and solver variables are stored in device arrays with an explicit batch dimension. All numerical problem data, solver states, and intermediate quantities remain in device memory throughout the solve. The interface accepts device arrays supporting the CUDA array interface through zero-copy views, avoiding intermediate host staging.
Each instance maintains its own primal–dual iterate, proximal centers, regularization parameters, step lengths, and solver status, and advances according to the update rules in Section II. Since instances generally require different numbers of iterations, a device-resident activity indicator records whether problem requires further iterations. After each iteration, the convergence conditions in (15) are evaluated independently for each active instance. An instance becomes inactive upon convergence or detection of another terminal solver status, including unboundedness and infeasibility. Subsequent updates to its iterate, proximal centers, and solver parameters are disabled, preserving its final solution and termination status.
Step lengths, parameter updates, termination checks, and activity updates are computed on the GPU. The activity indicators are reduced on the device to form the aggregate continuation flag . The shared loop terminates when this flag is false, or the prescribed iteration limit is reached. Both per-instance numerical decisions and batch-level loop control therefore remain on the device, avoiding per-iteration host intervention and host-device synchronization unless verbose output is enabled to print solver progress at each iteration.
B. Execution Overhead Reduction
For batches of small QPs, kernel dispatch and memory allocation can account for a substantial fraction of the solve time. CUIQP makes efforts to reduce these costs through kernel fusion, workspace reuse, and CUDA graph replay.
Operations for residual evaluation, variable updates, step-length computation, regularization updates, and termination checks are grouped into a small number of WARP kernels, reducing kernel launches and intermediate memory traffic. The required reductions are performed independently within each QP using per-problem block reductions.
During the setup phase, CUIQP allocates reusable solver workspaces, generates and compiles the required WARP kernels, and performs structure-dependent preprocessing like re-ordering and symbolic analysis where required. The allocated workspaces, compiled kernels, and preprocessing results are reused across subsequent update, solve, and optional backward phases, keeping allocation, compilation, and preprocessing outside repeated solves. The persistent workspaces also provide stable memory addresses for CUDA graph capture and replay.
The device-side iteration control described in Section IV-A is implemented using CUDA conditional graph nodes to determine whether to execute another iteration. A complete iteration is captured once and replayed for subsequent iterations, reducing the host-side overhead of dispatching individual kernels and library calls. Verbose execution instead uses a host-controlled loop to report progress at each iteration. The interface also supports capturing update and solve within a user-defined CUDA graph when full-solve capture is supported and verbose output is disabled. This allows simulation, QP construction, solution, and actuation to form a single replayable pipeline in robotic applications.
C. Problem Representations and Linear Algebra Backends
CUIQP provides dedicated interfaces for dense, sparse, and multistage QPs. All three follow the batched algorithm of Section IV and share the surrounding implementation, but differ in input representation, data layout, and KKT solution strategy.
-
Dense solver: All problem data are given as dense arrays and stored, together with all solver variables, as contiguous device arrays with a leading batch dimension, so that every operation of the iteration is a uniform batched operation without indirect memory access. The dense solver uses the Schur complement system (8), which is factorized and solved with the batched Cholesky routines. The matrix is computed once and cached for reuse across iterations. For small matrices (empirically smaller than ), we use shape-specialized kernels for linear algebra operations, while using CUBLAS and CUSOLVER for larger matrices.
-
Sparse solver: The matrices , , and are given in compressed sparse rows (CSR) format with one sparsity pattern for the whole batch. The index arrays are stored once, and the nonzero values are stored as contiguous batched device arrays. The sparse solver uses the augmented system (7) and performs factorization through CuDSS. The symbolic analysis is performed once in the setup phase and reused for the subsequent numerical factorization and triangular solve.
-
Multistage solver: The multistage solver targets batched QPs arising from multistage optimization problems following [26], such as optimal control problems (OCPs). For , each has the form
s.t.
where denotes the decision variable at stage of , and is the horizon length. We assume uniform stage sizes, with equality constraints and inequality constraints at every stage. All QPs in the batch share , , , , while their numerical data may vary with . The stage blocks are given directly and stored as batched dense arrays and never assembled into big sparse matrices.
For OCPs, the terminal stage typically has no control input and therefore fewer variables. We can pad it to obtain a uniform stage size.
With the Schur complement formulation (8), the matrix has a block-tri-diagonal structure. We solve it using the parallel method proposed in [27] and its open-source implementation SOCU, which achieves an time complexity thanks to the parallelism exploited both across the batch and along the horizon, while the sequential approaches in [26] have time complexity.
D. Constraint Handling and Numerical Robustness
Two-sided inequalities and variable bounds arise frequently in robotics. CUPIQP accepts both forms directly and incorporates their contributions using the treatment in [28, Ch. 3], avoiding enlarging the Schur complement system (8).
To improve numerical conditioning, CUPIQP applies Ruiz equilibration [29]. Optional iterative refinement is available after each linear solve. The maximum number of refinement iterations is user-configurable.
E. Implicit Differentiation
We implement the implicit differentiation method in Section III. When factors of the KKT system at the differentiation point are available, they can be reused for the adjoint solve without an additional factorization, as mentioned in Remark 2. However, when differentiating through closed-loop trajectories generated by an optimization-based policy, as demonstrated in Sec. V-C, retaining the factors from every forward solve can require substantial memory. We therefore only save the problem coefficients and solutions needed to reconstruct each system and perform numerical factorization again during the backward pass, trading additional computation for reduced memory usage. We also implement dedicated PYTORCH and JAX interfaces to integrate the forward solve and backward computation into their respective automatic differentiation pipelines.
V. EXPERIMENTAL RESULTS
We comprehensively evaluate the CUPIQP solver on batched QPs from multiple robotic applications, including inverse kinematics, whole-body control, and differentiable linear MPC.
A. Experimental Setting
All experiments run on Ubuntu 24.04 with an Intel Ultra 9 285K CPU, 64 GB of RAM, and an NVIDIA GeForce RTX 5090 (32 GB), under float64 arithmetic. We compare CUPIQP against QPAX and MOREAU, with the latter using cuDSS as its linear-system solver. Iterative refinement is disabled if applicable. We additionally include PIQP [5]'s sparse backend and HPIPM [3] as CPU solver baselines, using custom C++ bindings to create 8 solver instances pinned onto 8 performance cores of the CPU to solve the batched QPs concurrently with OpenMP.
For all solvers, we use absolute tolerance and relative tolerance , except QPAX because it struggles to converge to high accuracy and frequently runs to the maximum iteration. Therefore, we relax its tolerance to , giving it a potential advantage in both iteration count and solve time.
We report steady-state wall time with solver data already resident in host or device memory. Data preparation, setup, JIT compilation, and CUDA-graph capture are excluded. The first call warms up the solvers under every configuration. Reported times are medians of at least 20 solves in Sec. V-B and 10 solves in Sec. V-C.
B. Batched Inverse Kinematics and Whole-body Control
- Inverse kinematics: We form IK QPs such that each QP is a linearized SQP step of the nonlinear IK problem at the current configuration . Given the Jacobian and pose error of each end-effector , we compute a joint increment by weighting its task-space tracking residual with . We set the damping weight to and use to retain a margin from the joint limits:
The two Unitree G1 benchmark datasets record the QPs generated by GMR [30] while retargeting all 77 motion-capture sequences from the LAFAN1 dataset [31] that span diverse motions including walking, running, and fighting. Each recorded QP is sampled from a different motion frame, while the dataset collectively covers different SQP iterations. Together, these variations yield a diverse benchmark dataset that captures both the changing robot configurations and the different numerical regimes encountered throughout SQP convergence in practical applications. The benchmark datasets for Franka and ALOHA robots are constructed in the same manner using real-world teleoperation data [32] and [33], respectively.
-
Batched whole-body control: We form inverse dynamics WBC QPs for the 29-DoF Unitree G1, generated from LAFAN1 motions retargeted to the robot [31]. Following a standard inverse dynamics formulation [34], each QP has 76 variables comprising generalized accelerations, joint torques, and two 6D sole wrenches; 47 rigid-body-dynamics and contact-acceleration equalities; 20 friction, center-of-pressure, and torsional inequalities; and joint, torque, acceleration, and wrench bounds. Left support, right support, flight, and double support are represented with a common dimension and sparsity pattern by setting airborne contact wrenches to zero. The objective tracks the recorded whole-body motion and regularizes torques and contact wrenches.
-
Results: We compare CUPIQP-dense, CUPIQP-sparse, MOREAU, QPAX, and PIQP for . Recomputed constraint violations are below and objectives agree with each other within , except for QPAX, which reaches the iteration limit without converging on some problems. At , QPAX fails on 56 G1 problems and 215 G1-with-hands problems.
The time complexity assumes sufficient hardware resources to execute the operations concurrently. With a sufficiently large batch size, the GPU can saturate the available parallelism and the wall-clock time no longer exhibits logarithmic scaling w.r.t. N.
We use its balance mode, same as the default setting in ACADOS.

Fig. 1: Batched solve time (top) and distribution of iterations at (bottom) for the IK and WBC problems, with the median marked by solid black bars. The iteration limit is marked with a red dashed line. The hollow markers indicate that for at least one QP in the batch, the solver failed to converge to the required tolerance within the maximum number of iterations.
Fig. 1 reports the batch-scaling solver time and the distribution of iterations for problems in the largest batch. Among the dense solvers, CUPIQP-dense consistently achieves lower solve times than QPAX, despite using a stricter stopping tolerance. The difference is most pronounced on the G1 IK and WBC problems, where QPAX reaches the iteration limit for a subset of instances. Among the sparse solvers, CUPIQP-sparse consistently outperforms MOREAU with up to speedup.
Importantly, the speedups are not obtained by reducing the number of interior-point iterations: the iteration distributions of both CUPIQP backends exhibit tightly clustered iteration counts, with medians comparable to those of MOREAU and PIQP. Therefore, the substantial timing advantage over MOREAU and QPAX is consistent with the emphasis on performance optimization in Section IV-B.
The CUPIQP dense solver remains preferable for the small problems, whereas its sparse solver becomes about faster than the dense solver for the G1-with-hands problems, demonstrating the benefit of exploiting sparsity once the problem is sufficiently large.
Compared to the CPU solver PIQP, 8-core PIQP is faster at small batch sizes across all five benchmarks, but is surpassed by CUPIQP as the batch size increases due to the improved GPU utilization and amortization of fixed execution costs. At the largest batch, CUPIQP is faster than PIQP by on Franka IK, on G1 IK, on G1-with-hands IK, and on ALOHA.
C. Learning Differentiable Linear MPC for Quadrotors
To evaluate CUPIQP in the end-to-end differentiable learning pipeline, we optimize the cost weights of a linear MPC for a Crazyflie quadrotor tracking a figure-eight trajectory
with a period of 4 s.
- MPC formulation: The MPC uses a hover-linearized model with state , comprising position, roll-pitch-yaw angles, linear velocity, and body-frame angular velocity. The input contains the four rotor thrusts. The prediction horizon of 1 s is discretized into steps, with dynamics and initial state . With , the objective is
Roll and pitch are bounded by rad, body-frame angular velocities by rad/s, and each rotor thrust by . To ensure feasibility, all state constraints are softened with linear and quadratic slack penalties with coefficients fixed throughout training. The input constraints remain hard.
We fix and parameterize the diagonal state weights as with , where are fixed scales. We deliberately initialize to yield poor tracking performance. QPAX and CUPIQP-dense solve the condensed QP obtained by eliminating the state variables, and the other solvers retain both states and inputs as decision variables.
- Learning problem: The MPC weights are trained to minimize a closed-loop objective defined by the per-step loss
where contains roll and pitch, and is the sum of squared violations of the tilt, angular-rate, and altitude limits. The training objective averages this loss over T = 40 rollout

(a)
(b)
(c)
Fig. 2: Learning the MPC weights at . (a) Top-down paths of a closed-loop rollout with the initial weights (top) and with the learned weights (bottom). The dot marks the starting position. (b) Training loss versus Adam step. (c) Loss versus wall-clock training time; markers show the end of the 60 steps with the training time.
TABLE I: Time per Adam step (seconds) at multiple batch sizes, and its percentage share of each component, including QP solves for the forward rollout, QP backward passes, and everything else. For HPIPM, only its forward QP solve time is reported. Shaded: fastest QP forward time per batch size among the GPU solvers.
| Solver | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| QP fwd. | QP bwd. | Other | Total | QP fwd. | QP bwd. | Other | Total | QP fwd. | QP bwd. | Other | Total | |
| CUPIQP-dense | 1.37 (80%) | 0.09 (5%) | 0.26 (15%) | 1.72 | 3.83 (88%) | 0.25 (6%) | 0.27 (6%) | 4.36 | 14.26 (92%) | 0.92 (6%) | 0.29 (2%) | 15.47 |
| CUPIQP-multistage | 0.43 (60%) | 0.04 (5%) | 0.25 (35%) | 0.72 | 0.91 (74%) | 0.07 (6%) | 0.25 (20%) | 1.24 | 2.88 (87%) | 0.18 (5%) | 0.26 (8%) | 3.31 |
| CUPIQP-sparse | 0.72 (70%) | 0.06 (5%) | 0.25 (24%) | 1.03 | 1.74 (82%) | 0.12 (6%) | 0.26 (12%) | 2.12 | 5.28 (90%) | 0.30 (5%) | 0.27 (5%) | 5.85 |
| MOREAU | 2.89 (82%) | 0.38 (11%) | 0.26 (7%) | 3.53 | 8.79 (86%) | 1.16 (11%) | 0.27 (3%) | 10.21 | 35.18 (89%) | 4.20 (11%) | 0.28 (1%) | 39.66 |
| QPAX | 2.27 (85%) | 0.12 (5%) | 0.27 (10%) | 2.66 | 5.14 (90%) | 0.24 (4%) | 0.34 (6%) | 5.72 | 18.03 (94%) | 0.74 (4%) | 0.34 (2%) | 19.11 |
| HPIPM | 0.21 | - | - | - | 0.79 | - | - | - | 3.13 | - | - | - |
steps and trajectories:
We optimize with 60 Adam steps. Each step evaluates a batch of 2s closed-loop rollouts using a nonlinear quadrotor simulation model, with randomized initial conditions and figure-eight dimensions. The controller solves a new MPC problem at each rollout step, yielding 40 batched QP solves per Adam step. Gradients propagate through these solves and the nonlinear model in the simulator to the entries of . All solvers use identical training batches, initial weights, loss functions, and Adam optimizer settings.
- Results: We evaluate the controllers on 64 test trajectories not used during training. Each closed-loop simulation lasts 12 s and covers three complete cycles of the figure-eight reference. During training, all QPs are solved to the specified tolerance. After training, the root-mean-square (RMS) position error decreases from 187 mm to 55 mm with the learned weights for all five solvers, as illustrated by Fig. 2(a). Moreover, the loss curves versus Adam step nearly coincide across solvers as shown in Fig. 2(b). Despite differences in QP formulation and differentiation implementation, the solvers therefore produce essentially the same learning progress. This agreement is consistent with numerically consistent forward solutions and backward gradients in this experiment. The solvers therefore achieve essentially the same control
performance and differ primarily in computational time, as shown in Fig. 2(c).
On the condensed formulation, CUPIQP-dense reduces training time by 25% relative to QPAX, even under stricter convergence requirements. On the uncondensed formulation, CUPIQP-sparse provides a speedup over MOREAU. The CUPIQP-multistage provides a further speedup over CUPIQP-sparse and completes training and faster than QPAX and MOREAU, respectively, showing the advantages of explicitly exploiting the multistage structure in optimal control problems.
While Fig. 2 reports training at , Table I additionally evaluates and to examine how the per-step computational cost scales with batch size and breaks down the total time into QP forward solves, QP backward passes, and the remaining computation. Forward QP solves account for 60–94% of the total time across the differentiable solvers and batch sizes, whereas backward passes account for only approximately 5–6% for CUPIQP. The multistage backend achieves the lowest total time at all three batch sizes, with its relative advantage increasing as the batch grows. At , an Adam step takes 3.31 s, giving speedups of and over the sparse and dense CUPIQP backends, and and over QPAX and MOREAU, respectively.
We additionally report the forward QP solve time of
HPIPM in Table I since it does not support differentiation. HPIPM is faster at and , while CUPIQP-multistage becomes competitive at . At this batch size, its forward time is 2.88s, compared with 3.13s for HPIPM.
VI. CONCLUSIONS
We presented CUPIQP, a batched and differentiable QP solver on GPUs that supports dense, sparse, and multi-stage problems within a unified framework. Benchmark results demonstrate solve-time speedups of up to over MOREAU and over eight-core PIQP. In differentiable quadrotor MPC, these computational gains translated into end-to-end training speedups of over QPAX and over MOREAU. By reducing the computational cost of integrating model-based optimization into large-scale robot learning and control, CUPIQP provides a reusable foundation for future research and applications.
Future work will extend this foundation to differentiable sequential quadratic programming for nonlinear MPC and broader optimization-based applications.
ACKNOWLEDGMENT
Anthropic Claude Code and OpenAI Codex were used to assist with manuscript preparation, software debugging and performance optimization, and the implementation of experimental scripts. All generated material was reviewed, verified, and revised by the authors, who take full responsibility for the content and results.
REFERENCES
[1] H. Ferreau, C. Kirches, A. Potschka, H. Bock, and M. Diehl, "qpOASES: A parametric active-set algorithm for quadratic programming," Mathematical Programming Computation, vol. 6, no. 4, pp. 327–363, 2014.
[2] B. Stellato, G. Banjac, P. Goulart, A. Bemporad, and S. Boyd, "OSQP: an operator splitting solver for quadratic programs," Mathematical Programming Computation, vol. 12, no. 4, pp. 637–672, 2020.
[3] G. Frison and M. Diehl, "HPIPM: a high-performance quadratic programming framework for model predictive control," IFAC-PapersOnLine, vol. 53, no. 2, pp. 6563–6569, 2020, 21st IFAC World Congress.
[4] A. Bambade, F. Schramm, S. El-Kazdadi, S. Caron, A. Taylor, and J. Carpentier, "PROXQP: An efficient and versatile quadratic programming solver for real-time robotics applications and beyond," IEEE Transactions on Robotics, vol. 41, pp. 1–20, 2025.
[5] R. Schwan, Y. Jiang, D. Kuhn, and C. N. Jones, "PIQP: A proximal interior-point quadratic programming solver," in IEEE Conference on Decision and Control (CDC), 2023, pp. 1088–1093.
[6] B. Amos, I. D. J. Rodriguez, J. Sacks, B. Boots, and J. Z. Kolter, "Differentiable mpc for end-to-end planning and control," in Proceedings of the 32nd International Conference on Neural Information Processing Systems, ser. NIPS'18. Red Hook, NY, USA: Curran Associates Inc., 2018, p. 8299–8310.
[7] A. Romero, E. Aljalbout, Y. Song, and D. Scaramuzza, "Actor-critic model predictive control: Differentiable optimization meets reinforcement learning for agile flight," IEEE Transactions on Robotics, vol. 42, pp. 673–692, 2026.
[8] R. Reiter, J. Hoffmann, D. Reinhardt, F. Messerer, K. Baumgaertner, S. Sawant, J. Boedecker, M. Diehl, and S. Gros, "Synthesis of model predictive control and reinforcement learning: Survey and classification," in Annual Reviews in Control, vol. 61, February 2026, p. 101045.
[9] S. H. Jeon, H. J. Lee, S. Hong, and S. Kim, "Residual mpc: Blending reinforcement learning with gpu-parallelized model predictive control," IEEE Transactions on Robotics, vol. 42, pp. 3469–3488, 2026.
[10] N. Rudin, D. Hoeller, P. Reist, and M. Hutter, "Learning to walk in minutes using massively parallel deep reinforcement learning," in Conference on Robot Learning (CoRL), ser. Proceedings of Machine Learning Research, vol. 164, 2022, pp. 91–100.
[11] Y. Chen, D. Tse, P. Nobel, P. Goulart, and S. Boyd, "Cuclarabel: Gpu acceleration for a conic optimization solver," ACM Trans. Math. Softw., vol. 52, no. 3, Aug. 2026.
[12] G. M. Chari and B. Açikmege, "QOCO-GPU: A quadratic objective conic optimizer with GPU acceleration," Mathematical Programming Computation, 2026.
[13] NVIDIA Corporation, "NVIDIA cuOpt," 2026, GPU-accelerated decision optimization software. [Online]. Available: https://docs.nvidia.com/cuopt/user-guide/latest/
[14] B. Amos and J. Z. Kolter, "OptNet: Differentiable optimization as a layer in neural networks," in Proceedings of the 34th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 70. PMLR, 2017, pp. 136–145.
[15] K. Tracy and Z. Manchester, "On the differentiability of the primal-dual interior-point method," 2024.
[16] S. Barratt, P. Nobel, and S. Diamond, "Moreau: GPU-native differentiable optimization," Optimal Intellect, Inc., 2026. [Online]. Available: https://moreau.so
[17] A. Du, E. Adabag, G. Bravo-Palacios, and B. Plancher, "GATO: GPU-accelerated and batched trajectory optimization for scalable edge model predictive control," 2026.
[18] E. Adabag, M. Greiff, J. Subosits, and T. Lew, "Differentiable model predictive control on the GPU," 2025.
[19] G. Bravo-Palacios, J. Zhang, Z. Pestrikov, B. Plancher, and T. Lew, "Turbompc: Fast, scalable, and differentiable model predictive control on the gpu," 2026.
[20] H. Hose, S. H. Jeon, C. Khazoom, S. Kim, and S. Trimpe, "Warmpc: Large-batch mpc on gpu via admm with unrolled factorization," 2026.
[21] R. Verschueren, G. Frison, D. Kouzoupis, J. Frey, N. van Duijkeren, A. Zanelli, B. Novoselnik, T. Albin, R. Quirynen, and M. Diehl, "acados – a modular open-source framework for fast embedded optimal control," Mathematical Programming Computation, 2021.
[22] J. Frey, K. Baumgärtner, G. Frison, D. Reinhardt, J. Hoffmann, L. Fichtner, S. Gros, and M. Diehl, "Differentiable nonlinear model predictive control," 2025.
[23] R. T. Rockafellar, "Augmented lagrangians and applications of the proximal point algorithm in convex programming," Math. Oper. Res., vol. 1, no. 2, p. 97–116, May 1976.
[24] S. Mehrotra, "On the implementation of a primal-dual interior point method," SIAM Journal on Optimization, vol. 2, no. 4, pp. 575–601, 1992.
[25] M. Macklin, "Warp: A High-performance Python Framework for GPU Simulation and Graphics," Mar. 2022, nVIDIA GPU Technology Conference (GTC). [Online]. Available: https://github.com/NVIDIA/warp
[26] R. Schwan, D. Kuhn, and C. N. Jones, "Exploiting multistage optimization structure in proximal solvers," in 2025 IEEE 64th Conference on Decision and Control (CDC), 2025, pp. 4677–4683.
[27] —, "GPU-accelerated cholesky factorization of block tridiagonal matrices," 2026.
[28] R. Schwan, "Numerical methods for optimization and control: From verification to GPU-acceleration," Ph.D. dissertation, EPFL, Lausanne, 2026.
[29] D. Ruiz, "A scaling algorithm to equilibrate both rows and columns norms in matrices," Rutherford Appleton Laboratory, Tech. Rep. RAL-TR-2001-034, 2001.
[30] J. P. Araújo, Y. Ze, P. Xu, J. Wu, and C. K. Liu, "Retargeting matters: General motion retargeting for humanoid motion tracking," in IEEE International Conference on Robotics and Automation (ICRA), 2026.
[31] F. G. Harvey, M. Yurick, D. Nowrouzezhrai, and C. Pal, "Robust motion in-betweening," ACM Transactions on Graphics, vol. 39, no. 4, pp. 60:1–60:12, 2020.
[32] A. Khazatsky, K. Pertsch, S. Nair, A. Balakrishna, S. Dasari, S. Karamcheti, S. Nasiriany, M. K. Srirama et al., "DROID: A large-scale in-the-wild robot manipulation dataset," in Robotics: Science and Systems (RSS), 2024.
[33] T. Z. Zhao, V. Kumar, S. Levine, and C. Finn, "Learning fine-grained bimanual manipulation with low-cost hardware," in Robotics: Science and Systems (RSS), 2023.
[34] S. Kuindersma, R. Deits, M. Fallon, A. Valenzuela, H. Dai, F. Permenter, T. Koolen, P. Marion, and R. Tedrake, "Optimization-based locomotion planning, estimation, and control design for the Atlas
humanoid robot," Autonomous Robots, vol. 40, no. 3, pp. 429–455, 2016.