betaFeedback

WorksComputer Science

FAME-QP: A GPU-Accelerated Quadratic-Programming Solver for Real-Time Model Predictive Control

Abstract

We present FAME-QP, a GPU-accelerated solver for dense quadratic programs arising in linear model predictive control. FAME-QP combines constraint-dependent operator representations with fused single- and two-kernel iterations replayed through CUDA graphs, automatically selecting the execution configuration through device calibration and problem-specific timing. It probes a cached operator bank to select the initial penalty and updates operators lazily when problem matrices change. Numerical benchmarks and simulated humanoid and quadrotor control experiments demonstrate reduced latency relative to competing GPU solvers while maintaining solution accuracy and control performance.

Introduction

Quadratic programming (QP) problems arise in a wide range of applications, including statistics, machine learning, finance, and model predictive control (MPC) for robotic and control systems [1, 2, 3]. They also appear as subproblems in nonlinear optimization algorithms, such as sequential quadratic programming (SQP). Many of these applications lead to convex QP problems. Among these applications, MPC requires solving an optimization problem within each control sampling period, making computational efficiency critical for real-time operation [4]. With linear prediction models, convex quadratic costs, and linear constraints, each MPC update requires solving a convex QP problem, yielding a formulation commonly referred to as linear MPC (LMPC).

Common solution approaches for QP problems include interior-point (IP), active-set (AS), operator-splitting (OS), and proximal methods. Representative IP methods include HPIPM [5], qpSWIFT [6], PIQP [7], and Clarabel [8] (with QP as a special case). Although IP methods often converge in relatively few iterations, each iteration requires solving a potentially expensive linear system. They are also generally more difficult to warm start, limiting their ability to exploit similarities between successive QP problems in MPC [9].

AS methods, such as qpOASES [10] and DAQP [11], readily support warm starting and can be highly efficient when initialized with the correct active set. However, their combinatorial worst-case complexity in the number of constraints can limit their scalability to large-scale QPs [9]. OS methods based on the alternating direction method of multipliers (ADMM), such as OSQP [2], and related proximal methods, such as ProxQP [12], are increasingly used in robotic MPC owing to their ease of warm starting and suitability for applications requiring moderate solution accuracy [13], [14]. Moreover, their computational structure offers opportunities for parallelization. Nevertheless, their convergence rates can be slower than those of other methods, particularly when high-accuracy solutions are required [7].

Although most established QP solvers are CPU-based, GPUs offer opportunities to accelerate large-scale QP solving through massive parallelism and higher memory bandwidth, enabling concurrent execution of independent computations and faster data movement [13]. Growing interest in MPC for robotics and control using world models [15], [16], locally linear latent dynamics [17], and Koopman-based linear, bilinear, or semi-linear representations [18]–[20] further motivates GPU acceleration to meet the real-time computational demands of large-scale MPCs. Moreover, modern robotics increasingly relies on GPUs for parallel simulation, inference, and learning [21]–[23]. Integrating CPU-native QP solvers into such pipelines can introduce additional latency through frequent CPU–GPU data transfers [24]. Together, these considerations motivate GPU-native QP solvers that keep optimization data and computations on the device.

This work presents FAME-QP, Fused ADMM with Multimode Execution for QP solution, a GPU solver for the dense QPs of linear MPC. Its contributions are: (i) constraint-dependent operator representations that reduce operator storage by up to 4×4\times and iteration time by up to 3×3\times, relative to treating all constraint rows as dense; (ii) fused single- and two-kernel iterations with CUDA graph replay and automatic selection using device calibration and problem-specific timing;

Authors are with the Department of Mechanical & Aerospace Engineering, The Ohio State University, Columbus, OH, USA. E-mail: rajkumar.36, goswami.78, stockar.1}@osu.edu

Open Source Code: https://github.com/santoshrajkumar/fame-qp (iii) initial penalty selection through cached-operator probing and lazy operator updates for changing QP matrices; (iv) numerical and simulated robotic MPC evaluations demonstrating lower latency than the competing GPU methods evaluated in each benchmark, with matched solution accuracy on random QPs and comparable closed-loop control performance; and (v) an open-source implementation.

GPU QP solvers. cuOSQP [13] parallelizes OSQP through indirect linear solves, while qpax [25] and CuPIQP [26] implement IP methods on GPUs, with CuPIQP exploiting kernel fusion and CUDA graph replay. The closest approach is ReLU-QP [9], which reformulates ADMM as a weight-tied neural network and caches pre-inverted operators for penalty adaptation. Its dense operator and repeated dispatch introduce computational and execution overhead, while its offline precomputation limits online matrix updates. FAME-QP retains the pre-inversion and penalty-bank approach but uses smaller, constraint-dependent operators, fused graph-replayed iterations, and lazy operator updates.

GPU MPC solvers. MPCGPU [27] and TurboMPC [28] accelerate nonlinear MPC through GPU implementations of SQP and structured linear algebra. πMPC [29] exploits parallelism across the prediction horizon through consensus ADMM, while CUDA MPC [30] reduces execution overhead using a persistent cooperative kernel and CUDA graphs. These methods exploit structure at the optimal-control level, whereas FAME-QP accepts dense convex QPs directly, including general constraint matrices and online matrix changes.

Positioning. Our contribution lies in combining constraint-dependent operator representations with automatic selection between fused single- and two-kernel iterations, initial penalty probing, and lazy matrix updates. The execution configuration is selected through device calibration and problem-specific timing, targeting the latency of individual MPC solves.

Preliminaries

Notations. Define N0:={0}∪N\mathbb{N}_0 := \{0\} \cup\mathbb{N}. Let S+n\mathbb{S}_{+}^{n} be the set of symmetric positive semi-definite matrices of dimension n×nn \times n. For a,b∈N0a, b \in\mathbb{N}_0 with b≥ab \ge a, define [a:b]:={a,…,b}[a:b] := \{a,\ldots,b\}. Let 0\mathbf{0} and II denote the zero vector or matrix and the identity matrix, respectively, of appropriate dimensions. For a matrix or vector, a space or comma separates columns, and a semicolon separates rows, where applicable.

Convex QP problem. A convex QP problem takes the following form [31]

min⁡z∈Rn12zTPz+qTzs.t.l≤Gz≤h,(1)\min_{z \in\mathbb{R}^{n}} \frac{1}{2}z^{\mathsf{T}}Pz + q^{\mathsf{T}}z \quad\text{s.t.}\quad l \le Gz \le h, \tag*{(1)}

where zz is the decision variable, P∈SnP \in\mathbb{S}^{n}, G∈Rm×nG \in\mathbb{R}^{m \times n}, q∈Rnq \in\mathbb{R}^{n}, l∈(R∪{−∞})ml \in(\mathbb{R} \cup\{-\infty\})^{m}, and h∈(R∪{+∞})mh \in(\mathbb{R} \cup\{+\infty\})^{m}.

LMPC. Consider the discrete-time linear system xk+1=Axk+Bukx_{k+1}=Ax_k+Bu_k, where xk∈Rnxx_k \in\mathbb{R}^{n_x} and uk∈Rnuu_k \in\mathbb{R}^{n_u} denote the state and input, respectively. At each sampling instant, LMPC measures the current state x^\hat{x} and solves the following optimal control problem (OCP) over a prediction horizon of NN steps [31]:

min⁡x,u 12∑k=0N−1(xkTQxk+ukTRuk)+12xNTQNxN(2)\min_{x,u}\ \frac{1}{2}\sum_{k=0}^{N-1}\left(x_k^{\mathsf{T}}Qx_k+u_k^{\mathsf{T}}Ru_k\right)+\frac{1}{2}x_N^{\mathsf{T}}Q_Nx_N \tag*{(2)}
s.t. x0=x^,xk+1=Axk+Buk,k∈[0:N−1],(3)\text{s.t. } x_0=\hat{x},\quad x_{k+1}=Ax_k+Bu_k,\quad k \in[0:N-1], \tag*{(3)}
u≤uk≤uˉ,k∈[0:N−1],(4)u \le u_k \le\bar{u},\quad k \in[0:N-1], \tag*{(4)}
x≤xk≤xˉ,k∈[1:N].(5)x \le x_k \le\bar{x},\quad k \in[1:N]. \tag*{(5)}

with x={xk}k=0Nx=\{x_k\}_{k=0}^{N} and u={uk}k=0N−1u=\{u_k\}_{k=0}^{N-1}. Here, QQ, QN⪰0Q_N \succeq0 and R≻0R \succ0 are the state, terminal, and input weighting matrices, respectively. The controller applies the first optimal input u0∗u_0^*, shifts the horizon forward by one step, and repeats the procedure at the next sampling instant.

GPU computation. We restrict attention to NVIDIA GPUs and the CUDA programming model [32]. GPU computations execute as kernels: functions typically launched by the host and executed in parallel by threads grouped into blocks [33]. Threads within a block share fast on-chip memory and synchronize efficiently, while communication between blocks typically uses global memory. Successive kernels in the same stream execute in order, making kernel boundaries a standard way to synchronize all blocks between computational stages [32]. A CUDA graph represents a workflow of GPU operations, such as kernel launches and data transfers, and the dependencies between them. The workflow is prepared once and can then be executed repeatedly with a single host call, reducing host-side launch overhead [32].

When a kernel is launched, its thread blocks are scheduled onto the GPU’s streaming multiprocessors (SMs), where threads execute in groups of 32 called warps, using values held in registers. Global memory accesses may be served by GPU caches, while threads within a block can exchange data through on-chip shared memory. Registers and shared memory have thread and block lifetimes, respectively, so intermediate results passed between kernels are typically stored in global memory [32]. The runtime of a computation expressed as a sequence of kernels therefore depends on arithmetic, data movement through the memory hierarchy, and launch and scheduling overhead. Kernel fusion combines operations that would otherwise execute in separate kernels into a single kernel, allowing some intermediate results to remain in registers or shared memory. This can reduce both the number of kernel launches and global memory accesses [34].

Solving the QP with ADMM

To solve (1), we employ the ADMM formulation proposed in [2]. Introducing an auxiliary variable s∈Rms \in\mathbb{R}^{m} yields the equivalent problem

min⁡z,s 12zTPz+qTz+IC(s)s.t.Gz=s,(6)\min_{z,s}\ \frac{1}{2}z^{\mathsf{T}}Pz+q^{\mathsf{T}}z+\mathcal{I}_{\mathcal{C}}(s)\quad\text{s.t.}\quad Gz=s, \tag*{(6)}

where IC(s)={0 if s∈C,+∞ otherwise}\mathcal{I}_{\mathcal{C}}(s)=\{0\ \text{if }s\in\mathcal{C},+\infty\ \text{otherwise}\} and C:={s:l≤s≤h}\mathcal{C}:=\{s:l\le s\le h\}. With auxiliary variables z~∈Rn\tilde{z}\in\mathbb{R}^{n} and s~∈Rm\tilde{s}\in\mathbb{R}^{m}, (3) can be rewritten as

min⁡z,s,z~,s~ J=12z~TPz~+qTz~+IC(s)+IE(z~,s~)(7)\min_{z,s,\tilde{z},\tilde{s}}\ \mathcal{J}=\frac{1}{2}\tilde{z}^{\mathsf{T}}P\tilde{z}+q^{\mathsf{T}}\tilde{z}+\mathcal{I}_{\mathcal{C}}(s)+\mathcal{I}_{\mathcal{E}}(\tilde{z},\tilde{s}) \tag*{(7)}

s.t. (z~,s~)=(z,s)(\widetilde{z},\widetilde{s})=(z,s), (4b)

where IE(z~,s~)={0 if Gz~=s~,+∞ otherwise}\mathcal{I}_{\mathcal{E}}(\widetilde{z},\widetilde{s})=\{0\text{ if }G\widetilde{z}=\widetilde{s},+\infty\text{ otherwise}\} and E:={(z~,s~):s~=Gz~}\mathcal{E}:=\{(\widetilde{z},\widetilde{s}):\widetilde{s}=G\widetilde{z}\}. Let μ∈Rn\mu\in\mathbb{R}^{n} and λ∈Rm\lambda\in\mathbb{R}^{m} be the Lagrange multipliers associated with z~=z\widetilde{z}=z and s~=s\widetilde{s}=s, respectively. The augmented Lagrangian, omitting terms constant in the primal variables, is

L=J+σ2∥z~−z+μ/σ∥22+12∥s~−s+ρ−1λ∥ρ2(8)\mathcal{L}=\mathcal{J}+\frac{\sigma}{2}\left\|\widetilde{z}-z+\mu/\sigma\right\|_{2}^{2}+\frac{1}{2}\left\|\widetilde{s}-s+\rho^{-1}\lambda\right\|_{\rho}^{2} \tag*{(8)}

where σ>0\sigma>0 is the proximal regularization parameter, ρ=diag⁡(ρ1,…,ρm)≻0\rho=\operatorname{diag}(\rho_{1},\ldots,\rho_{m})\succ0 is the diagonal penalty matrix, and ∥v∥ρ2=vTρv\|v\|_{\rho}^{2}=v^{\mathsf{T}}\rho v.

Given the iterate (zj,sj,μj,λj)(z^{j},s^{j},\mu^{j},\lambda^{j}) at iteration j∈N0j\in\mathbb{N}_{0} and a relaxation parameter α∈(0,2)\alpha\in(0,2), ADMM involves the following steps

(z~j+1,s~j+1)=arg⁡min⁡z~,s~ L(z~,s~,zj,sj;μj,λj),(9)(\widetilde{z}^{j+1},\widetilde{s}^{j+1})=\underset{\widetilde{z},\widetilde{s}}{\arg\min}\ \mathcal{L}(\widetilde{z},\widetilde{s},z^{j},s^{j};\mu^{j},\lambda^{j}), \tag*{(9)}
zj+1=αz~j+1+(1−α)zj+σ−1μj,(10)z^{j+1}=\alpha\widetilde{z}^{j+1}+(1-\alpha)z^{j}+\sigma^{-1}\mu^{j}, \tag*{(10)}
sj+1=arg⁡min⁡s∈C 12∥sj+1−s+ρ−1λj∥ρ2,(11)s^{j+1}=\underset{s\in\mathcal{C}}{\arg\min}\ \frac{1}{2}\left\|s^{j+1}-s+\rho^{-1}\lambda^{j}\right\|_{\rho}^{2}, \tag*{(11)}
μj+1=μj+σ(αz~j+1+(1−α)zj−zj+1),(12)\mu^{j+1}=\mu^{j}+\sigma\left(\alpha\widetilde{z}^{j+1}+(1-\alpha)z^{j}-z^{j+1}\right), \tag*{(12)}
λj+1=λj+ρ(s~j+1−sj+1).(13)\lambda^{j+1}=\lambda^{j}+\rho(\widetilde{s}^{j+1}-s^{j+1}). \tag*{(13)}

where s^j+1:=αs~j+1+(1−α)sj\widehat{s}^{j+1}:=\alpha\widetilde{s}^{j+1}+(1-\alpha)s^{j}. The zz-update implies μj+1=0\mu^{j+1}=0; hence, initializing μ0=0\mu^{0}=0 eliminates μ\mu from all iterations.

Closed form. Substituting s~=Gz~\widetilde{s}=G\widetilde{z} into (6a) and setting the gradient with respect to z~\widetilde{z} to zero yields

Kz~j+1=σzj−μj−q+GT(ρsj−λj),(14)K\widetilde{z}^{j+1}=\sigma z^{j}-\mu^{j}-q+G^{\mathsf{T}}(\rho s^{j}-\lambda^{j}), \tag*{(14)}

where K:=P+σI+GTρG≻0K:=P+\sigma I+G^{\mathsf{T}}\rho G\succ0. Moreover, since ρ\rho is positive diagonal and C\mathcal{C} is a box, (6c) separates into scalar minimizations solved by componentwise clipping. With μ0=0\mu^{0}=0 and s0∈Cs^{0}\in\mathcal{C}, one ADMM iteration reduces to

z~j+1=M[σzj−q+GT(ρsj−λj)],(15)\widetilde{z}^{j+1}=M[\sigma z^{j}-q+G^{\mathsf{T}}(\rho s^{j}-\lambda^{j})], \tag*{(15)}
s~j+1=Gz~j+1,(16)\widetilde{s}^{j+1}=G\widetilde{z}^{j+1}, \tag*{(16)}
zj+1=αz~j+1+(1−α)zj,(17)z^{j+1}=\alpha\widetilde{z}^{j+1}+(1-\alpha)z^{j}, \tag*{(17)}
ζj+1=αs~j+1+(1−α)sj+ρ−1λj,(18)\zeta^{j+1}=\alpha\widetilde{s}^{j+1}+(1-\alpha)s^{j}+\rho^{-1}\lambda^{j}, \tag*{(18)}
sj+1=ΠC(ζj+1),(19)s^{j+1}=\Pi_{\mathcal{C}}(\zeta^{j+1}), \tag*{(19)}
λj+1=ρ(ζj+1−sj+1),(20)\lambda^{j+1}=\rho(\zeta^{j+1}-s^{j+1}), \tag*{(20)}

where ΠC(ζ)=min⁡{max⁡{ζ,l},h}\Pi_{\mathcal{C}}(\zeta)=\min\{\max\{\zeta,l\},h\} acts componentwise and M=K−1M=K^{-1}. Here, ζj+1\zeta^{j+1} is the unconstrained minimizer of the quadratic in (6c), and ρ−1λj+1\rho^{-1}\lambda^{j+1} is the projection residual. Consequently, λij+1>0\lambda_{i}^{j+1}>0 implies sij+1=his_{i}^{j+1}=h_{i}, λij+1<0\lambda_{i}^{j+1}<0 implies sij+1=lis_{i}^{j+1}=l_{i}, and li<sij+1<hil_{i}<s_{i}^{j+1}<h_{i} implies λij+1=0\lambda_{i}^{j+1}=0.

Optimality and termination. At a fixed point of (8), z~=z\widetilde{z}=z and s~=s=Gz\widetilde{s}=s=Gz, yielding Pz+q+GTλ=0Pz+q+G^{\mathsf{T}}\lambda=0 and s=ΠC(s+ρ−1λ)s=\Pi_{\mathcal{C}}(s+\rho^{-1}\lambda). These are the KKT conditions of (1); σ\sigma and ρ\rho affect convergence but not these conditions. The iteration terminates when

rprimj:=∥Gzj−sj∥∞≤ϵabs+ϵrelηpj,(21)r_{\mathrm{prim}}^{j}:=\left\|Gz^{j}-s^{j}\right\|_{\infty}\leq\epsilon_{\mathrm{abs}}+\epsilon_{\mathrm{rel}}\eta_{\mathrm{p}}^{j}, \tag*{(21)}
rdualj:=∥Pzj+q+GTλj∥∞≤ϵabs+ϵrelηdj,(22)r_{\mathrm{dual}}^{j}:=\left\|Pz^{j}+q+G^{\mathsf{T}}\lambda^{j}\right\|_{\infty}\leq\epsilon_{\mathrm{abs}}+\epsilon_{\mathrm{rel}}\eta_{\mathrm{d}}^{j}, \tag*{(22)}

where ηpj:=max⁡{∥Gzj∥∞,∥sj∥∞}\eta_{\mathrm{p}}^{j}:=\max\{\|Gz^{j}\|_{\infty},\|s^{j}\|_{\infty}\}, ηdj:=max⁡{∥Pzj∥∞,∥GTλj∥∞,∥q∥∞}\eta_{\mathrm{d}}^{j}:=\max\{\|Pz^{j}\|_{\infty},\|G^{\mathsf{T}}\lambda^{j}\|_{\infty},\|q\|_{\infty}\}, and ϵabs,ϵrel>0\epsilon_{\mathrm{abs}},\epsilon_{\mathrm{rel}}>0 are the absolute and relative tolerances, respectively.

LMPC as a QP Problem

With the predicted states and inputs stacked into the decision vector z=col⁡(x0,u0,…,xN−1,uN−1,xN)z=\operatorname{col}(x_{0},u_{0},\ldots,x_{N-1},u_{N-1},x_{N}), the OCP (2) admits a sparse QP formulation of the general form (1) [31 Sec. 14.2.2]. The sparse QP formulation of LMPC has n=(N+1)nx+Nnun=(N+1)n_{x}+Nn_{u} decision variables and m=Nnx+nm=Nn_{x}+n constraint rows. Eliminating the predicted states through the dynamics yields a condensed QP formulation of (2) with only n=Nnun=Nn_{u} input variables [35], whose dense matrix structure is well suited to GPU-accelerated operations in standard machine-learning libraries. Let U=col⁡(u0,…,uN−1)U=\operatorname{col}(u_{0},\ldots,u_{N-1}) and X=col⁡(x1,…,xN)X=\operatorname{col}(x_{1},\ldots,x_{N}). The linear dynamics give X=Ax^+BUX=\mathcal{A}\hat{x}+\mathcal{B}U, where

A=[AA2⋮AN],B=[B0⋯0ABB⋯0⋮⋮⋱⋮AN−1BAN−2B⋯B],(23)\mathcal{A}=\begin{bmatrix} A \\ A^{2} \\ \vdots\\ A^{N} \end{bmatrix},\qquad \mathcal{B}=\begin{bmatrix} B & 0 & \cdots& 0\\ AB & B & \cdots& 0\\ \vdots& \vdots& \ddots& \vdots\\ A^{N-1}B & A^{N-2}B & \cdots& B \end{bmatrix}, \tag*{(23)}

with A∈RNnx×nx\mathcal{A}\in\mathbb{R}^{Nn_{x}\times n_{x}} and B∈RNnx×Nnu\mathcal{B}\in\mathbb{R}^{Nn_{x}\times Nn_{u}}. With Q=blkdiag⁡(Q,…,Q,QN)∈RNnx×NnxQ=\operatorname{blkdiag}(Q,\ldots,Q,Q_{N})\in\mathbb{R}^{Nn_{x}\times Nn_{x}} and R=blkdiag⁡(R,…,R)R=\operatorname{blkdiag}(R,\ldots,R), the condensed QP takes the form (1) with z=Uz=U and

P=BTQB+R,q=BTQAx^,G=[B;I],P=\mathcal{B}^{\mathsf{T}}Q\mathcal{B}+\mathcal{R},\qquad q=\mathcal{B}^{\mathsf{T}}Q\mathcal{A}\hat{x},\qquad G=[\mathcal{B};I],
l=[X‾−Ax^;U‾],h=[X‾−Ax^;U‾],(24)l=[\underline{X}-\mathcal{A}\hat{x};\underline{U}],\qquad h=[\overline{X}-\mathcal{A}\hat{x};\overline{U}], \tag*{(24)}

where X‾,X‾∈RNnx\underline{X},\overline{X}\in\mathbb{R}^{Nn_{x}} and U‾,U‾∈RNnu\underline{U},\overline{U}\in\mathbb{R}^{Nn_{u}} stack the state and input bounds over the horizon, so GG has m=N(nx+nu)m=N(n_{x}+n_{u}) rows. The constant terms independent of UU are omitted from the objective. We use the condensed QP formulation of LMPC in this work and recommend LQR pre-stabilization [35 Sec. IV] where needed to mitigate ill-conditioning for open-loop unstable systems.

FAME-QP Method

FAME-QP implements the ADMM iteration (8) with the pre-inverted matrix M=K−1M=K^{-1}, and concentrates on how that iteration is executed on the GPU. At setup, the problem is scaled once by a modified Ruiz equilibration [2, 36]: P→cTPTP\to cTPT, q→cTqq\to cTq, G→VGTG\to VGT, (l,h)→(Vl,Vh)(l,h)\to(Vl,Vh), with positive diagonal T∈Rn×nT\in\mathbb{R}^{n\times n} and V∈Rm×mV\in\mathbb{R}^{m\times m} equilibrating the columns and rows of [PGTG0]\begin{bmatrix}P&G^{\mathsf{T}}\\G&0\end{bmatrix} in ten passes and c>0c>0 normalizing the cost. The iteration runs on the scaled problem, whose solution (z′,s′,λ′)(z',s',\lambda') maps back as z=Tz′z=Tz', s=V−1s′s=V^{-1}s', λ=c−1Vλ′\lambda=c^{-1}V\lambda'; the test (9) is evaluated on the unscaled residuals, and later problem data are scaled with the same T,V,cT,V,c. The penalty matrix is parameterized by a single scalar ρ>0\rho>0 as ρ=ρdiag⁡(b)\rho=\rho\operatorname{diag}(b). For each i∈[1:m]i\in[1:m], let bib_{i}, lil_{i}, and hih_{i} denote the iith entries of bb, ll, and hh, respectively. We set bi=103b_{i}=10^{3} if li=hil_{i}=h_{i} (an equality constraint) and bi=1b_{i}=1 otherwise. Algorithm 1 summarizes the setup and solve phases.

Constraint Structures

FAME-QP exploits constraint rows that act on individual decision variables and distinguishes three structures of G∈Rm×nG \in\mathbb{R}^{m \times n}: box, G=D:=diag⁡(d)G = D := \operatorname{diag}(d) with d∈Rnd \in\mathbb{R}^{n}, di≠0d_i \ne0 for all i∈[1:n]i \in[1:n], so m=nm=n; split, G=[D;C]G = [D;C] after a row permutation, with D∈Rn×nD \in\mathbb{R}^{n \times n} nonsingular diagonal and C∈Rmc×nC \in\mathbb{R}^{m_c \times n} the remaining rows, mc>0m_c > 0, so m=n+mcm=n+m_c; and general, with no complete diagonal block, where all rows are handled as dense, C=GC=G and mc=mm_c=m. Under standard condensing, LMPC with input bounds alone has the box structure and adding state bounds yields the split structure. LQR pre-stabilization [35] couples the input constraints and produces the general structure. In split form, for each i∈[n+1:m]i \in[n+1:m] (corresponding to the rows of CC only), we set bi=103γb_i=10^3\gamma if li=hil_i=h_i (equality constraints) and bi=γb_i=\gamma otherwise, with γ>0\gamma>0.

Two Operator Forms

The first two updates in (8) couple different entries through matrix–vector products; the remaining updates are elementwise because ρ\rho is diagonal and CC is a box. Omitting the iteration index jj, we describe the operators for each constraint structure.

General structure. With C=GC=G and mc=mm_c=m, define r=[σz−q;ρs−λ]∈Rn+mr=[\sigma z-q;\rho s-\lambda]\in\mathbb{R}^{n+m}. Then (15) and (16) admit the stacked form

[z~s~]=Wr,W=[MMGTGMGMGT](25)\begin{bmatrix}\tilde{z}\\\tilde{s}\end{bmatrix}=Wr,\qquad W=\begin{bmatrix}M & MG^{\mathsf{T}}\\GM& GMG^{\mathsf{T}} \tag*{(25)}\end{bmatrix}

which computes both updates in one matrix–vector product. The factored form stores F=[M,MGT]F=[M,MG^{\mathsf{T}}] and GG, and computes z~=Fr\tilde{z}=Fr followed by s~=Gz~\tilde{s}=G\tilde{z}.

Split structure. For G=[D;C]G=[D;C], partition ρ\rho, ss, and λ\lambda conformally. Since D=diag⁡(d)D=\operatorname{diag}(d), its contribution can be absorbed elementwise into r=[σz−q+d∘(ρdsd−λd);ρcsc−λc]∈Rn+mcr=[\sigma z-q+d\circ(\rho_d s_d-\lambda_d);\rho_c s_c-\lambda_c]\in\mathbb{R}^{n+m_c}, where ∘\circ denotes elementwise multiplication. The stacked form (25) then applies with GG replaced by CC and s~\tilde{s} by s~c\tilde{s}_c; the factored form uses F=[M,MCT]F=[M,MC^{\mathsf{T}}] followed by s~c=Cz~\tilde{s}_c=C\tilde{z}. Both recover s~d=d∘z~\tilde{s}_d=d\circ\tilde{z}, so DD need not be stored in either operator.

Box structure. With G=DG=D and mc=0m_c=0, define r=σz−q+d∘(ρs−λ)r=\sigma z-q+d\circ(\rho s-\lambda). Both forms reduce to z~=Mr\tilde{z}=Mr and s~=d∘z~\tilde{s}=d\circ\tilde{z}, using one fused kernel per iteration. Only the dense matrix MM and the diagonal vector dd are stored, requiring n2+nn^2+n entries in total. Compared with treating DD as dense, this reduces storage from 4n24n^2 entries for the stacked form or 3n23n^2 for the factored form. After exploiting the diagonal structure, the two forms are identical.

For the split and general structures, the stacked operator contains (n+mc)2(n+m_c)^2 entries, whereas FF and CC together contain n(n+2mc)n(n+2m_c). Thus, the factored form reads

(n+mc)2−n(n+2mc)=mc2(26)(n+m_c)^2-n(n+2m_c)=m_c^2 \tag*{(26)}

fewer operator entries per iteration, at the cost of two sequential kernels instead of one fused kernel.

The Penalty Bank: Adaptation and Probing

FAME-QP precomputes the operators for a bank of five penalties, spaced by factors of 10 and initially centered at ρ0=0.1\rho_0=0.1. Adapting ρ\rho during a solve therefore selects a stored operator rather than recomputing an inverse. After each convergence check, OSQP’s residual-balancing rule proposes ρnew=ρrprim/rdual\rho_{\mathrm{new}}=\rho\sqrt{r_{\mathrm{prim}}/r_{\mathrm{dual}}}, using the residual norms and scales in (9). If the proposal differs from the current ρ\rho by more than a factor of 5, it is snapped to the nearest bank entry. The multiplier λ\lambda is retained across switches, since its optimal value is independent of ρ\rho. The penalty grid remains fixed during each solve.

The same bank is also used to select the starting penalty. At setup, each entry initializes a trial of at most 400 iterations from zero, with adaptation enabled. Each trial records the time and iteration count needed to satisfy 1/100, 1/10, and 1 times the requested tolerances. Trials are compared at the tightest tolerance reached by any trial; the fastest determines the starting ρ\rho, and its iteration count provides the estimate jestj_{\mathrm{est}} used in § 3-E. Ties favor the first tested entry. If an endpoint wins, the bank is re-centered there and probed again, with at most two rebuilds. This search adds setup cost but no per-solve probing.

For split constraints, input bounds are often active while state bounds are mostly inactive, so a common penalty can overweight the dense rows. We therefore probe γ∈{10−3,…,10}\gamma\in\{10^{-3},\ldots,10\} at the selected ρ\rho, then re-probe ρ\rho with the selected γ\gamma. The resulting γ\gamma is fixed in every bank entry; in-solve adaptation changes only the scalar ρ\rho.

Execution Modes

Both modes perform the complete ADMM iteration (8) on the GPU, fusing the elementwise updates with the operator products.

Single-kernel iteration. With the stacked operator, one fused kernel computes WrWr and completes the iteration. Each thread block evaluates its assigned output rows, then immediately applies the corresponding updates: primal rows relax z~\tilde{z} to update zz; constraint rows form ζ\zeta, project it onto [l,h][l,h] to update ss, and update λ\lambda. For split constraints, the primal rows also compute s~d=d∘z~\tilde{s}_d=d\circ\tilde{z} and complete the diagonal constraint updates. Each block then constructs its portion of the next rr. Two buffers alternate as input and output, preventing writes from overwriting entries that other blocks are still reading. For box constraints, the same kernel uses MM and handles all constraint updates elementwise.

Two-kernel iteration. With the factored operator, the first kernel computes z~=Fr\tilde{z}=Fr, updates zz, and completes any diagonal constraint updates. It stores z~\tilde{z} for the second kernel, which computes s~c=Cz~\tilde{s}_c=C\tilde{z} and immediately performs the dense constraint projection and dual update. Each kernel constructs the corresponding portion of the next rr. The kernel boundary ensures that all entries of z~\tilde{z} are available before evaluating Cz~C\tilde{z}. Box constraints require no second kernel.

CUDA-graph replay. At setup, jchkj_{\mathrm{chk}} complete iterations followed by the termination test (9) are captured as a CUDA graph. Each replay executes this sequence with one host (CPU) call, preserving the dependencies between kernels and iterations. The test computes PzPz, GzGz, and GTλG^{\mathsf{T}}\lambda on the device, followed by two reduction kernels that produce the residual norms, their scales ηp,ηd\eta_p,\eta_d, and a stop flag. The host reads these five values once per replay to terminate, declare a stall (no 10% residual decrease in 12 checks), or adapt ρ\rho using the penalty bank. After a penalty switch, rr is rebuilt before replay resumes. Thus, fusion reduces kernels per iteration, while graph replay reduces host dispatch and synchronization to once per jchkj_{\mathrm{chk}} iterations.

Automatic Mode Selection

FAME-QP selects the operator form and tunes its kernel tile configuration once per problem shape. The iteration-time model is

titer≈nkerτ+tstream(bop),(27)t_{\mathrm{iter}} \approx n_{\mathrm{ker}}\tau+ t_{\mathrm{stream}}(b_{\mathrm{op}}), \tag*{(27)}

where nker∈{1,2}n_{\mathrm{ker}} \in\{1,2\}, τ\tau is the overhead per kernel node in a replayed graph, and bopb_{\mathrm{op}} is the operator size in bytes. Once per device and precision, FAME-QP measures τ\tau, the host-read cost treadt_{\mathrm{read}}, and tstreamt_{\mathrm{stream}} over feasible operator sizes from 0.25–64 MB, stopping if memory allocation fails. Outside the measured range, tstreamt_{\mathrm{stream}} is extrapolated linearly at the bandwidth of the nearest endpoint. These measurements are cached.

For box constraints, the forms coincide and only the single-kernel configuration is tuned. For split and general constraints, stacking saves one launch but reads βmc2\beta m_c^2 additional bytes, where β\beta is the number of bytes per value. Under a constant-bandwidth approximation, the stacked form is predicted to be faster when mc<τ BW/βm_c < \sqrt{\tau\,\mathrm{BW}/\beta}, with BW denoting the effective memory bandwidth.

An operator form is first excluded if its estimated penalty-bank storage exceeds 60% of currently free GPU memory; setup fails if neither form fits. Among feasible forms, those predicted more than 1.5 times slower than the best are discarded. The remaining forms and their tile configurations are timed inside CUDA graphs using placeholder operators of the actual dimensions. The single-kernel mode is retained unless the measured two-kernel time is more than 10% shorter. Thus, the model prunes the search, while measured timings determine the final selection. Using the measured titert_{\mathrm{iter}}, the predicted time for jestj_{\mathrm{est}} iterations is

Tgraph=⌈jestjchk⌉(jchktiter+tcheck+tread),(28)T_{\mathrm{graph}} = \left\lceil\frac{j_{\mathrm{est}}}{j_{\mathrm{chk}}} \right\rceil \left(j_{\mathrm{chk}}t_{\mathrm{iter}} + t_{\mathrm{check}} + t_{\mathrm{read}}\right), \tag*{(28)}

where tcheckt_{\mathrm{check}} is the device-side termination-test time.

Updates, Warm Starts, and Precision

Between solves, new q,l,hq,l,h are scaled using the stored T,V,cT,V,c, and rr is rebuilt. Changes to PP or GG that preserve the constraint structure trigger rescaling and in-place re-inversion of either the full bank or, in lazy mode, only the active entry. Other entries are marked stale and recomputed when selected by a penalty switch. The captured graph is retained, and ρ\rho carries over between solves. A warm start initializes z,λz,\lambda and reconstructs s=ΠC(Gz)s=\Pi_{\mathcal{C}}(Gz), optionally after shifting the previous solution one stage along the horizon.

The bank is always inverted in float64, while operators and iterates use float32 or float64. Single-precision residuals may stagnate near 10−610^{-6}; a stalled solve returns solved_inaccurate if it satisfies the termination test at 100 times the requested tolerances. The working precision is either fixed by the user or selected automatically before the setup of Algorithm 1. In automatic mode, FAME-QP estimates the condition number κ(K)=λmax⁡(K)/λmin⁡(K)\kappa(K)=\lambda_{\max}(K)/\lambda_{\min}(K) by power iterations. For target accuracy ϵ\epsilon and u32=2−24u_{32}=2^{-24}, it selects float32 if u32κ(K)≤0.01ϵu_{32}\kappa(K)\le0.01\epsilon and float64 if u32κ(K)≥ϵu_{32}\kappa(K)\ge\epsilon. Otherwise, the setup is run in both precisions, which are compared by TgraphT_{\mathrm{graph}} in (15), preferring float64 when its prediction is within 20% of float32.

Algorithm 1 FAME-QP

Input: data P,q,G,l,hP,q,G,l,h; tolerances ϵabs,ϵrel\epsilon_{\mathrm{abs}},\epsilon_{\mathrm{rel}}; parameters σ,α\sigma,\alpha; check interval jchkj_{\mathrm{chk}}; iteration limit jmax⁡j_{\max}; precision

Output: (z,s,λ)(z,s,\lambda) and status

Setup (once)

  1. Detect constraint structure; Ruiz-scale data ▷ Sec. III-A

  2. Select execution mode ▷ Sec. III-E

  3. Build penalty bank; capture jchkj_{\mathrm{chk}} iterations and test (9) as a CUDA graph ▷ Sec. III-C, III-D

  4. Probe α\alpha (and γ\gamma if split); re-center bank as needed Solve (each QP)

  5. Scale new data; if PP or GG changed, refresh the bank fully or lazily ▷ Sec. III-F

  6. Initialize z,λz,\lambda from zero or a warm start; s←ΠC(Gz)s\leftarrow\Pi_{\mathcal{C}}(Gz)

  7. Form rr as in Sec. III-B; j←0j\leftarrow0

  8. repeat ▷ one graph replay per pass

  9. for jchkj_{\mathrm{chk}} iterations do

  10. if mc=0m_c=0 then ▷ box

  11. z~←Mr\tilde z\leftarrow M r

  12. else if stacked form then ▷ single-kernel

  13. [z~;s~c]←Wr[\tilde z;\tilde s_c]\leftarrow W r

  14. else ▷ factored form, two-kernel

  15. z~←Fr; s~c←Cz~\tilde z\leftarrow F r;\ \tilde s_c\leftarrow C\tilde z

  16. end if

  17. s~←[d∘z~;s~c]\tilde s\leftarrow[d\circ\tilde z;\tilde s_c] ▷ blocks present

  18. z←αz~+(1−α)z; ζ←αs~+(1−α)s+ρ−1λz\leftarrow\alpha\tilde z+(1-\alpha)z;\ \zeta\leftarrow\alpha\tilde s+(1-\alpha)s+\rho^{-1}\lambda

  19. s←ΠC(ζ); λ←ρ(ζ−s)s\leftarrow\Pi_{\mathcal{C}}(\zeta);\ \lambda\leftarrow\rho(\zeta-s); form next rr

  20. end for

  21. Evaluate (9) on the GPU; j←j+jchkj\leftarrow j+j_{\mathrm{chk}}

  22. Host reads the norms, scales, and stop flag

  23. if continuing then adapt ρ\rho as in Sec. III-C

  24. if ρ\rho switched then refresh a stale entry; rebuild rr

  25. until converged, stalled, or j≥jmax⁡j\ge j_{\max}

  26. return unscaled (z,s,λ)(z,s,\lambda) and status

Experimental Results

We evaluate FAME-QP through numerical benchmarks and closed-loop robotic control experiments in high-fidelity MuJoCo simulations. The CPU QP baselines are OSQP [2], PIQP [7], ProxQP [12], Clarabel [8], and DAQP [11]. The GPU baselines include the QP solvers cuOSQP [13], ReLU-QP [9], qpax [25], and CuPIQP [26], and the MPC solvers CUDA MPC [30] and π\piMPC [29]. We use the original implementations, except for CUDA MPC, which we reimplement because its source code was unavailable. All experiments run on a system equipped with an NVIDIA RTX 3080 Laptop GPU (48 SMs, 16 GB VRAM) and an Intel Core i7-11850H processor with 32 GB RAM. Unless stated otherwise, FAME-QP runs in float64 with σ=10−6\sigma= 10^{-6}, α=1.6\alpha= 1.6, ϵabs=ϵrel=ϵ\epsilon_{\mathrm{abs}} = \epsilon_{\mathrm{rel}} = \epsilon for a stated tolerance ϵ\epsilon, jchk=10j_{\mathrm{chk}} = 10, and jmax=2×104j_{\mathrm{max}} = 2 \times10^{4} (10510^{5} in the closed-loop random-LMPC and Unitree G1 experiments), with penalty adaptation and probing enabled; lazy updates are used where the QP matrices change at every step (KQ-LMPC).

Numerical Experiments: Random QP and LMPC

Dense random QPs. We use the dense random QPs of [9], with n/4n/4 dense equality rows and n/4n/4 dense one-sided inequality rows (approximately 30% of the inequalities active), using five random seeds per problem size nn. To match solution accuracy across solvers, we sweep each solver’s tolerance over {10−3,…,10−8}\{10^{-3}, \ldots, 10^{-8}\} and select the loosest value yielding an ℓ∞\ell_{\infty} solution error of at most 10−310^{-3} on all five instances, relative to Clarabel solutions computed at tolerance 10−1010^{-10}. We report the mean across instances of their median solve times. FAME-QP is set up, including penalty probing, on a held-out instance of the same size. Setup time is excluded for all solvers; only solve time is reported. Figure 1 shows the median across five instances of their per-instance median cold-solve times, with min–max bands. Using the mean of these per-instance medians for numerical comparisons, FAME-QP in float64 outperforms all GPU baselines at every tested size and all CPU baselines for n≥220n \ge220. Over n=220n = 220–14001400, its speedups are 1.21.2–25.9×25.9\times over DAQP and 1.51.5–4.3×4.3\times over ReLU-QP, the best CPU and competing GPU baselines, respectively.

Figure 1. Cold-solve times on dense random QPs at matched accuracy, excluding setup. Lines show medians and bands show min–max ranges across five instances, each timed by its median over repeated cold solves. All solvers use float64 except cuOSQP (float32).

Since cuOSQP’s native implementation uses float32, we also evaluate FAME-QP in this precision under the same accuracy criterion. Single precision further reduces its solve time at most sizes, although float64 remains faster at n=600n = 600 and 800800. At n=1400n = 1400, the mean solve time is 1.95 ms in float32, compared with 5.01 ms in float64 and 326 ms for cuOSQP.

GPU LMPC on random systems. Following [9], we consider random unstable linear systems with nu∈{10,20,30,40,50}n_u \in\{10, 20, 30, 40, 50\}, nx=3nun_x = 3n_u, spectral radius 1.05, and horizon N=40N = 40, with Q=IQ = I, R=0.1IR = 0.1I, an LQR terminal cost, and input bounds ∣u∣≤1\lvert u\rvert\le1. Initial states are chosen so that input bounds are active on at least 30% of the steps under exact MPC. We compare FAME-QP with ReLU-QP and CuPIQP, the two fastest GPU QP baselines in the random-QP benchmark, and with the GPU MPC methods CUDA MPC and π\piMPC. The QP solvers receive the same LQR pre-stabilized condensed QP (n=40nun = 40n_u); the MPC methods receive the original OCP.

Each method runs 50 closed-loop steps in float64 after one untimed solve at x0x_0. Where supported, step 0 reuses that solution and later steps shift the previous solution one

stage; CuPIQP accepts no starting point and uses its native IP initialization. The QP solvers use tolerance 10−310^{-3} in their native stopping tests: absolute and relative for FAME-QP and CuPIQP, and absolute only for ReLU-QP, whose thresholds scale with m\sqrt{m} and n\sqrt{n}. π\piMPC uses its native fixed-point test with tolerance 10−610^{-6} at every iteration, and CUDA MPC, which has no convergence test, its fixed budget of 500 iterations. Timings exclude setup and the initialization solve but include data updates, warm-start shifts, and transfer of the first input to the host.

Table I shows that FAME-QP achieves the lowest mean step time at every size, from 0.658 to 4.23 ms. It is 3.2–7.3× faster than ReLU-QP, the closest QP baseline, and 3.2–13.8× faster than π\piMPC, the fastest MPC baseline, with smaller timing standard deviations than both at every size. Since the stopping tests are not equivalent, we also compare the accuracy achieved: closed-loop costs of all methods agree within 0.06%, and the largest bound violation of the returned input is at most 2.0×10−32.0 \times10^{-3} for FAME-QP, against 1.41.4–4.3×10−24.3 \times10^{-2} for ReLU-QP, about 10−410^{-4} for π\piMPC, and below 10−610^{-6} for CuPIQP and CUDA MPC.

Solver / nn400800120016002000
FAME-QP0.658 ± 0.0661.19 ± 0.042.05 ± 0.452.92 ± 0.094.23 ± 0.21
ReLU-QP2.10 ± 0.376.06 ± 1.0211.6 ± 1.920.0 ± 3.930.9 ± 6.1
CuPIQP23.7 ± 7.058.9 ± 11.3178 ± 42248 ± 63449 ± 120
CUDA MPC22.7 ± 1.159.9 ± 0.582.8 ± 0.8103 ± 0138 ± 3
π\piMPC9.06 ± 12.398.90 ± 12.886.78 ± 5.6715.4 ± 23.913.4 ± 18.1

Table I. Online MPC step times [ms], mean ± standard deviation over 50 steps. Setup and initialization are excluded; fastest means are bold.

Closed-Loop LMPC on MuJoCo Robotic Systems.

Unitree G1 humanoid push recovery. We evaluate balance recovery of the Unitree G1 in MuJoCo (29 position-controlled joints, 70 states) at a 2 ms control period. The prediction model is the discrete linearization of the full MuJoCo step about a bent-knee stance. The cost penalizes CoM displacement and joint deviations, with an LQR terminal cost and pre-stabilizing gain. Joint-target offsets are bounded by rated torque divided by actuator gain (0.01–0.28 rad). The resulting condensed QP has n=m=29Nn = m = 29N and general constraint structure. We compare against ReLU-QP, the fastest competing GPU QP solver in the random-QP benchmark. Both use float64 and tolerance 10−410^{-4}, with convergence checked every 10 and 25 iterations, respectively.

An 80 N torso push lasting 0.1 s tests recovery over 5 s (Figure 2). FAME-QP reduces mean QP time by 2.3–3.1×, remaining below the 2 ms control period at every tested horizon, whereas ReLU-QP exceeds it for N≥15N \ge15. Thus, FAME-QP doubles the largest tested horizon within the mean-time budget, from N=10N = 10 to N=20N = 20. Both methods achieve comparable balance recovery, with CoM RMS deviations of 18.7–20.5 mm (Table II).

Unitree G1 push recovery sequence

Figure 2. Unitree G1 push recovery in MuJoCo with FAME-QP: torso push, maximum lean, return, and final stance.

Quadrotor trajectory tracking in MuJoCo. We evaluate FAME-QP with changing prediction matrices using KQ-

NN (nn)QP time [ms] FAME-QPQP time [ms] ReLU-QPCoM RMS [mm] FAME-QPCoM RMS [mm] ReLU-QP
10 (290)0.650 ± 0.0911.47 ± 0.0518.718.7
15 (435)0.763 ± 0.1162.26 ± 0.1219.119.2
20 (580)1.04 ± 0.203.25 ± 0.1320.519.5

Table 2. Unitree G1 push recovery. QP times are mean ± std, excluding the first step.

LMPC [20], which constructs time-varying LMPC from analytically derived Koopman-lifted dynamics. The Skydio X2 tracks the supplied lemniscate trajectory for 20 s, starting on the reference, at 50 Hz. With four inputs and N=70N = 70, the condensed QP has n=280n = 280 variables, and a 1.4 s prediction horizon. Both the Hessian and the constraint matrix change at every step.

We compare against CuPIQP, the second-fastest GPU QP baseline in the random-QP benchmark. ReLU-QP is excluded because its native interface does not support matrix updates between solves. Both solvers use float64 and tolerance 10−410^{-4}, with setup and one initial solve performed before timing. FAME-QP uses shifted warm starts; CuPIQP computes its own IP starting point at each solve.

Including matrix updates, warm-start shifts, and host transfer, FAME-QP achieves a mean QP time of 12.5 ± 3.2 ms (mean ± standard deviation), compared with 59.2 ± 4.8 ms for CuPIQP, a 4.7× speedup. Its 99th-percentile latency is 17.6 ms, below the 20 ms control period, versus 72.1 ms for CuPIQP. Despite the changing QP matrices, FAME-QP maintains accurate tracking, with position RMSE of 2.7 mm versus 3.4 mm for CuPIQP; both have a maximum tracking error of 8.5 mm. Figure 3 shows the Skydio X2 quadrotor tracking the lemniscate trajectory with FAME-QP.

Skydio X2 trajectory tracking

Figure 3. Skydio X2 trajectory tracking in MuJoCo with FAME-QP.

nnExecution time per iteration [μs] Unfused eagerExecution time per iteration [μs] Unfused graphExecution time per iteration [μs] Fused eagerExecution time per iteration [μs] Fused graph
12814024.621.14.37
51214633.421.817.4
102814572.954.453.4
nnIterations DefaultIterations ProbedSolve time [ms] DefaultSolve time [ms] Probed
25074461.100.79
60098483.781.88
10001284010.63.21

Table 3. Execution and penalty ablations. Execution: median device time per iteration over 100 repetitions. Probing: mean iteration counts and mean per-instance median wall times over five test instances, with 20 cold solves per instance. Setup is excluded.

Ablation Study

We isolate GPU execution, constraint structure, operator selection, penalty probing, and matrix updates. Fixed-budget experiments time 200 iterations at a fixed penalty without termination checks; complete solves include convergence checks and transfer of the solution to the host. Within each comparison, the problem data and all other settings are identical.

Fusion and graph replay. We compare separate operations and fused kernels, each with ordinary launches or CUDA graph replay, on the same stacked operator with mc=n/4m_c = n/4. Table III shows that the two are complementary: at n=128n = 128, replay reduces the unfused iteration time from 140 to 24.6 μs and fusion further to 4.37 μs, replacing 14 kernels per iteration with one. The gain shrinks as the operator grows and the matrix–vector product dominates. All variants produce the same iterates to within 3×10−103 \times10^{-10}.

Constraint structure. For QPs with G=[I;C]G = [I; C], mc∈{0,n/4,n}m_c \in\{0,n/4,n\}, and both operator forms, we compare treating every row as dense against extracting the diagonal rows. Extraction reduces operator storage by 1.67–4.00× and iteration time by 1.07–3.03×, with unchanged iteration counts and solutions (within 10−1210^{-12}). At n=512n = 512 and mc=128m_c = 128, the stacked operator shrinks from 10.1 to 3.12 MiB and the iteration time from 49.8 to 17.3 μs, whereas ReLU-QP’s (n+2m)2(n + 2m)^2 operator needs 24.5 MiB and 86.3 μs under the same graph replay; overall, it is 1.6–5.8× slower per iteration than the extracted operator.

Automatic operator selection. We sweep mcm_c from 16 to 1024 for n∈{128,512,1028}n \in\{128,512,1028\} and compare the stacked, factored, and automatically selected forms. Automatic selection picks the faster form at 30 of 36 points; the six misses fall within the 10% retention margin of Sec. III-E, and the selected configuration is at most 9.5% slower than the faster fixed form, whereas always stacking or always factoring is up to 2.2× or 1.5× slower. Pruning never excludes the faster form, but the model alone misplaces the crossover by about a factor of two, hence the final choice by measured timings.

Penalty probing. To separate the starting penalty from bank re-centering, we compare default and probed starts on the dense random QPs, with one bank spanning both ranges. At tolerance 10−510^{-5}, the probed start reduces iterations by 1.6–3.2× and complete-solve time by 1.4–3.3× (Table III); widening the bank alone changes iteration counts by at most 5%. A separate run crosses unfused and fused iterations with and without the full probe (start and re-centered bank). Iteration counts do not depend on fusion, so the gains multiply: from n=250n = 250 to 1000, fusion contributes 2.00× falling to 1.26× and the probe 1.40× rising to 3.35×, for 2.8–4.2× combined, with the setup cost recovered after about 36–122 solves. Probed FAME-QP and default ReLU-QP reach 10−310^{-3} accuracy in similar iteration counts (30–38 versus 30–32), so the speedup over ReLU-QP stems mainly from per-iteration cost.

For split constraints, we replay a recorded quadrotor KQ-LMPC sequence (N=50N = 50) whose QP matrices change at every step. Probing ρ\rho lowers the median and tail step times relative to the default penalty; probing γ\gamma as well leaves the median essentially unchanged but further shortens the tail and nearly eliminates in-solve penalty switches.

Lazy matrix updates. In KQ-LMPC, PP and GG change at every step, so the pre-inverted operators must be rebuilt before each solve. Replaying the recorded quadrotor QPs with identical data and warm starts, we compare full refresh, which re-inverts all five bank entries at every step, with lazy refresh, which re-inverts only the active entry and the others when a penalty switch selects them. Full refresh makes the update, not the iterations, the dominant cost of a step; lazy refresh roughly halves the update and median step times and shortens the tail, with identical iteration counts, solutions equal to numerical precision, and unchanged closed-loop tracking error.

Conclusion

FAME-QP accelerates dense MPC quadratic programs through constraint-dependent operators, fused GPU execution with automatic configuration selection, penalty probing, and lazy matrix updates. Numerical and simulated robotic experiments demonstrate reduced latency while maintaining solution accuracy and control performance, including with changing prediction matrices. Future work will explore sparse and horizon-structured formulations to improve scalability.

References

  1. [1]B. A. Turlach and S. J. Wright, “Quadratic programming,” Wiley Interdiscip. Rev. Comput. Stat., vol. 7, no. 2, pp. 153–159, 2015.DOI
  2. [2]B. Stellato et al., “OSQP: An operator splitting solver for quadratic programs,” Math. Program. Comput., vol. 12, no. 4, pp. 637–672, 2020.
  3. [3]P. M. Wensing et al., “Optimization-based control for dynamic legged robots,” IEEE Trans. Robot., vol. 40, pp. 43–63, 2024.arxiv.org/abs/2211.11644
  4. [4]Y. Wang and S. Boyd, “Fast model predictive control using online optimization,” IEEE Trans. Control Syst. Technol., vol. 18, no. 2, pp. 267–278, 2010.
  5. [5]G. Frison et al., “HPIPM: A high-performance quadratic programming framework for model predictive control,” IFAC-PapersOnLine, vol. 53, no. 2, pp. 6563–6569, 2020.arxiv.org/abs/2003.02547
  6. [6]A. G. Pandala et al., “qpSWIFT: A real-time sparse quadratic program solver for robotic applications,” IEEE Robot. Autom. Lett., vol. 4, no. 4, pp. 3355–3362, 2019.DOI
  7. [7]R. Schwan et al., “PIOP: A proximal interior-point quadratic programming solver,” in Proc. IEEE Conf. Decis. Control, 2023.arxiv.org/abs/2304.00290
  8. [8]P. J. Goulart and Y. Chen, “Clarabel: An interior-point solver for conic programs with quadratic objectives,” Math. Program. Comput., pp. 1–83, 2026.
  9. [9]A. L. Bishop et al., “ReLU-QP: A GPU-accelerated quadratic programming solver for model-predictive control,” in Proc. IEEE Int. Conf. Robot. Autom., 2024, pp. 13 285–13 292.arxiv.org/abs/2311.18056
  10. [10]H. J. Ferreau et al., “qpOASES: A parametric active-set algorithm for quadratic programming,” Math. Program. Comput., vol. 6, no. 4, pp. 327–363, 2014.DOI
  11. [11]D. Åström et al., “A dual active-set solver for embedded quadratic programming using recursive LDLᵀ updates,” IEEE Trans. Autom. Control, vol. 67, no. 8, pp. 4362–4369, 2022.
  12. [12]A. Bambade et al., “Prox-QP: Yet another quadratic programming solver for robotics and beyond,” in Proc. Robot. Sci. Syst., 2022.DOI
  13. [13]M. Schubiger et al., “GPU acceleration of ADMM for large-scale quadratic programming,” J. Parallel Distrib. Comput., vol. 144, pp. 55–67, 2020.DOI
  14. [14]V. N. Dinh, “Real-time QP solvers: A concise review and practical guide towards legged robots,” arXiv preprint arXiv:2510.21773, 2025.arxiv.org/abs/2510.21773
  15. [15]N. Hansen et al., “TD-MPC2: Scalable, robust world models for continuous control,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2024.arxiv.org/abs/2310.16828
  16. [16]S. M. Rajkumar et al., “K-PWM: Control-oriented structured bilinear world models under partial observation,” arXiv preprint arXiv:2611.11521, 2026.arxiv.org/abs/2611.11521
  17. [17]M. Watter et al., “Embed to control: A locally linear latent dynamics model for control from raw images,” in Adv. Neural Inf. Process. Syst., vol. 28, 2015.arxiv.org/abs/1506.07365
  18. [18]M. Korda and I. Mezić, “Linear predictors for nonlinear dynamical systems: Koopman operator meets model predictive control,” Automatica, vol. 93, pp. 149–160, 2018.DOI
  19. [20]S. M. Rajkumar et al., “Real-time linear MPC for quadrotors on SE(3): An analytical Koopman-based realization,” IEEE Robot. Autom. Lett., vol. 10, no. 12, pp. 13 018–13 025, 2025.arxiv.org/abs/2409.12374
  20. [21]V. Makoviychuk et al., “Isaac Gym: High performance GPU based physics simulation for robot learning,” in Proc. NeurIPS Datasets Benchmarks Track, 2021.arxiv.org/abs/2108.10470
  21. [23]A. O’Neill et al., “Open X-Embodiment: Robotic learning datasets and RT-X models,” in Proc. IEEE Int. Conf. Robot. Autom. (ICRA), 2024.arxiv.org/abs/2310.08864
  22. [24]H. Lu, Z. Peng, and J. Yang, “MPAX: Mathematical programming in JAX,” in NeurIPS Workshop GPU-Accelerated Scalable Optim., 2025.arxiv.org/abs/2412.09734
  23. [25]K. Tracy and Z. Manches̄ter, “On the differentiability of the primal-dual interior-point method,” arXiv:2406.11749, 2024.arxiv.org/abs/2406.11749
  24. [26]F. Song, R. Schwan, Y. Cheng, J. Jiang, and C. N. Jones, “CuPIQP: A batched and differentiable QP solver on GPUs for robot learning and control,” arXiv:2610.41021, 2026.arxiv.org/abs/2610.41021
  25. [27]E. Adabag et al., “MPCGPU: Real-time nonlinear model predictive control through preconditioned conjugate gradient on the GPU,” in Proc. IEEE Int. Conf. Robot. Autom., 2024.DOI
  26. [28]G. Bravo-Palacios et al., “TurboMPC: Fast, scalable, and differentiable model predictive control on the GPU,” arXiv:2606.24039, 2026.
  27. [29]L. Wu et al., “πMPC: A parallel-in-horizon and construction-free NMPC solver,” arXiv:2601.14414, 2026.arxiv.org/abs/2601.14414
  28. [30]B. Akbari et al., “CUDA MPC: A GPU-native solver for model predictive control,” arXiv:2608.03051, 2026.arxiv.org/abs/2608.03051
  29. [31]F. Borrelli, A. Bemporad, and M. Morari, Predictive Control for Linear and Hybrid Systems. Cambridge University Press, 2017.
  30. [32]NVIDIA Corporation, CUDA C++ Programming Guide, accessed: Nov. 8, 2026. [Online]. Available: https://docs.nvidia.com/cuda/cuda-c-programming-guide.pdf
  31. [33]J. Nickolls et al., “Scalable parallel programming with CUDA,” in Proc. ACM SIGGRAPH Classes, 2008, pp. 1–14.
  32. [34]J. Filipović et al., “Optimizing CUDA code by kernel fusion: application on BLAS,” J. Supercomput., vol. 71, pp. 3934–3957, 2015.DOI
  33. [35]J. L. Jerez, E. C. Kerrigan, and G. A. Constantinides, “A condensed and sparse QP formulation for predictive control,” in Proc. IEEE Conf. Decis. Control Eur. Control Conf., 2011, pp. 5217–5222.DOI
  34. [36]D. Ruiz, “A scaling algorithm to equilibrate both rows and columns norms in matrices,” Rutherford Appleton Lab., Tech. Rep., 2001.

Paper details

vlnc:W_vy39yu79
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 2

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents