# GLASS: Architecture-Tuned, Composable, Device-Side Linear Algebra for Edge Robotics and Beyond

Robotics.world

> Robotics code running on GPUs lacks the shared, reusable numerical layer that CPU robotics gets from libraries like Eigen, BLASFEO, Pinocchio, and GTSAM. Instead, practitioners either use compiler…

**arXiv**: 2609.28179 · Preprint · not peer-reviewed

**Published**: 2026-09-23

**Authors**: Brian Plancher

## In plain words

Robotics code running on GPUs lacks the shared, reusable numerical layer that CPU robotics gets from libraries like Eigen, BLASFEO, Pinocchio, and GTSAM. Instead, practitioners either use compiler frameworks such as PyTorch and JAX — which cannot be embedded inside application kernels and pay per-call dispatch overhead — or repeatedly hand-write and tune bespoke low-level GPU code.

## AI summary

## Overview

**Research area:** GPU computing for robotics — specifically device-side numerical and linear algebra infrastructure for embedded (edge) robotics.

**Technical level:** Advanced. The paper assumes familiarity with CUDA execution hierarchies (threads, warps, blocks), BLAS/LAPACK-style routines, and GPU performance measurement.

**Scope (one sentence):** This paper introduces GLASS, a header-only CUDA C++ library that puts thread-, warp-, block-, and NVIDIA-backed implementations of robotics-scale linear algebra behind one composable device-side API, with implementation and launch choices pre-measured per GPU architecture and resolved at compile time.

## What This Paper Is About

Robotics code running on GPUs lacks the shared, reusable numerical layer that CPU robotics gets from libraries like Eigen, BLASFEO, Pinocchio, and GTSAM. Instead, practitioners either use compiler frameworks such as PyTorch and JAX — which cannot be embedded inside application kernels and pay per-call dispatch overhead — or repeatedly hand-write and tune bespoke low-level GPU code. GLASS aims to be that missing shared layer: a single device-side API whose numerical routines stay inside the surrounding application kernel, with the best implementation and launch configuration chosen by offline measurement for each target GPU.

## Key Contributions

1. **Composable GPU numerical infrastructure.** One device-side API spanning `glass::thread::`, `glass::warp::`, `glass::block::`, and `glass::nvidia::` implementations of dense and structured linear algebra plus robotics geometry (spatial algebra, SO(3), SE(3), quaternions, pose errors and retractions, projections).
2. **Measured execution placement.** Implementation choice, execution scope, and launch packing are treated as offline-measured, architecture-specific optimization decisions, folded through an architecture-specific `constexpr` table at compile time so there is no host dispatch or runtime overhead.
3. **Robotics-aware composition.** Primitives keep intermediates on device, enabling domain-specific fusion; composition granularity (fused vs. unfused) is itself a measured placement choice, reported to give as much as 1.75–2.9× speedups.
4. **Validated reuse in robotic systems.** Independent numerical oracles (NumPy, SciPy, Pinocchio, defining identities, residuals, finite differences) plus a source-bound local-GPU test attestation tool released separately as `pytest-gpu-proof`, with integration into two published robotics systems.

## Main Findings

- **Placement matters enormously.** The best and worst placements differ by a median of 4.9× and up to 81×, across six operations, eleven problem sizes, three batch regimes, and two scalar types (fp32, fp64), giving 396 cells per architecture.
- **Placements do not transfer across GPUs.** The Jetson AGX Orin's recommended placements differ from the RTX 5090 in 145 of 396 cells and from the AGX Xavier in 162 of 396. Even restricted to the common native GLASS backend candidates (excluding NVIDIA paths), 107/396 RTX–Orin, 94/396 RTX–Xavier, and 66/396 Orin–Xavier placements still change.
- **Cross-architecture reuse has a measured cost.** Transferring native placements adds 4–20% geometric-mean runtime depending on direction, with 95th-percentile penalties reaching 2.59×. Jetson-to-Jetson transfers cost only 4–5%, while carrying an Orin policy onto the RTX 5090 costs 20% on average.
- **Native GLASS wins most comparable cells on the edge.** On the Orin, native implementations win 99 of 195 comparable fp32 cells (51%), most often for dot, GEMV, GEMM, and triangular solves, at a geometric mean of 2.1×, with 39 exceeding 2× and a maximum of 22.1×. NVIDIA-backed implementations are selected or within the 5% dispatch margin in 96 of 195 cells (49%), dominated by factorizations.
- **The balance shifts on a workstation.** On the RTX 5090 the NVIDIA-backed share rises to 64% of its 192 comparable cells, with a maximum native win of only 3.9×.
- **Broader placement set beats narrower device libraries.** Against Eigen (compared only to `glass::thread::`, since Eigen is thread-embeddable), GLASS wins 36 of 126 cells, Eigen wins 26, 64 tie, median runtime ratio 1.00×. Against Kokkos Kernels, GLASS wins 119 of 162 cells, Kokkos wins 7, and 36 tie.
- **Large wins over host-dispatched libraries and frameworks.** On the Orin, GLASS beats cuBLAS/cuSOLVER up to 113.9× for POSV through N=64, up to 12.1× for GEMM through N=48, and up to 12.8× for POTRF through N=24. Against the per-cell best of PyTorch and JAX (device-resident I/O, pre-compiled and jitted), GLASS is faster in 359 of 378 cells with per-operation geometric means of 4.3–9.5× and individual cells reaching 73×.
- **Edge advantage exceeds workstation advantage.** GLASS's advantage over the best of PyTorch and JAX is as much as 73× on the Orin versus 12× on the RTX 5090; against cuBLAS/cuSOLVER the Xavier ablation reaches 89.3×, while on the RTX 5090 GLASS leads the frameworks in 320 of 378 cells at geometric means of 1.5–2.6×.
- **Robotics-specific operations benefit most from thread level.** On the Orin, the best fine-grained placement improves throughput 3.5–9.7× over whole-block execution (the same protocol spans 1.7–5.0× on the RTX 5090). Examples at B=4,096 include `closest_rotation` at 77.777 ns/problem for block versus 8.005 for thread (9.7×), `argmax` (n=16) at 16.208 versus 1.980 (8.2×), and `eig3` at 62.519 versus 8.012 (7.8×). Reduction-heavy fp32 `softmax` instead favors a warp (4.224 ns/problem versus 11.759 for thread).
- **Fusion is not always better.** For the LQR gain K = (R + BᵀPB)⁻¹BᵀPA, a fused `riccati_gain` kernel is up to 1.75× faster through B=64, but at larger batches, and for the register-heavier fp64 shapes almost everywhere, the unfused composition wins by up to 2.9×. Both dominate the equivalent seven-call host-dispatched vendor chain.
- **Power mode barely changes placement.** Dropping the Orin from 50 W to 30 W and 15 W increases geometric-mean runtime by 29% and 91% respectively, yet changes only 9 of 396 placement decisions in each mode (5–6 of which sit inside the dispatch margin). The same table can be reused across power modes.
- **Tuning is cheap and one-time.** Complete sweeps took 5.5 hours on the Orin, 9 hours on the Xavier, and 2 hours on the RTX 5090.
- **Real systems improved and a bug was found.** In a CUDA sampling-based MPC implementation, replacing application-specific reductions made a pre-existing failing host-versus-device normalization test pass; an independent double-precision reference showed the original reduction could return a non-minimal baseline, and the repair was accepted upstream. GLASS gave 1.21–1.50× speedups across 128–8192 rollouts on the Orin (1.21–1.46× on the RTX 5090).
- **Code reduction in a batched IK solver.** About 355 lines of specialized device numerics became 29 lines of application code (92% reduction), including a 201-line warp Cholesky replaced by `glass::warp::posv`. At batch size 2,000, Orin runtime dropped from 9.94 ms to 7.92 ms (1.26×), while the RTX 5090 gain was only 1.02×.

## Methodology in Plain English

The author starts from an observation: small numerical problems embedded inside larger robotics GPU kernels can be solved by several different strategies — one thread per problem, one warp per problem, one block per problem, or by calling vendor device routines — and there is no single best choice. Each strategy is implemented natively (and, where possible, wrapped from NVIDIA's CUB, cuBLASDx, and cuSOLVERDx), all sharing the same mathematical conventions and data layouts so they can be swapped freely.

Rather than deciding at runtime, GLASS benchmarks every feasible implementation on the actual target GPU offline, across a sweep of operations, problem sizes, batch sizes, and precisions. The results are stored in an architecture-specific table; a compile-time lookup then hard-wires the chosen implementation into the application's kernel, so nothing is dispatched or looked up during execution. Because switching between one-problem-per-block and one-problem-per-warp or -per-thread changes the application's launch geometry and indexing, GLASS also exposes a `recommend` API that reports the suggested scope and packing so the application can adopt it explicitly. A 5% dispatch margin is used so NVIDIA paths are only chosen when they are clearly faster than noise.

Correctness is validated separately from performance: conventional linear algebra against NumPy and SciPy, robotics operations against Pinocchio where possible, and everything else against defining identities, factorization residuals, algebraic equivalences, or finite-difference derivatives. Since hosted GPU CI is expensive, a companion `pytest` plugin runs tests on local GPUs, records the exact source tree and outcomes, and signs the result so CPU-only CI can verify rather than rerun — an engineering attestation, which the paper explicitly notes is not proof that a claimed GPU executed the tests.

Experiments span batch sizes from B=1 to B=8192 and problem sizes N=4 to N=128 on three GPUs: a Jetson AGX Orin (sm_87, CUDA 13.2) as the primary platform, a Jetson AGX Xavier (sm_72, CUDA 11.4) as an older edge comparison, and an RTX 5090 (sm_120, CUDA 13.2) as a workstation ablation. The NVIDIA backend covers 357 of 396 cells on the Orin (195 of 198 fp32), 354 on the RTX 5090 (192 fp32), and 0 on the Xavier, whose CUDA 11.4 toolchain predates device-callable MathDx.

## Why This Matters

For research, the paper argues that execution placement belongs in the reusable numerical interface, not in each application's code. It quantifies what is lost when that decision is made ad hoc, gives a concrete recipe (offline sweeps plus compile-time tables) for capturing it, and shows that placement policies are architecture-specific enough that cross-GPU transfer costs 4–20% on average and up to 2.59× at the 95th percentile. The validation tooling also addresses a growing concern: as AI coding tools make new GPU kernels cheaper to write but not cheaper to validate, shared tested primitives amortize correctness work.

Real-world applications:

- **Embedded model-predictive control and sampling-based MPC**, where per-rollout numerical kernels dominate runtime and dispatch overhead on small matrices is proportionally largest.
- **Batched inverse kinematics and trajectory optimization**, where the IK case study showed code dropping by 92% while runtime fell 1.26× on the Orin.
- **Legged and aerial robot state estimation, dynamics, and control**, which need SO(3)/SE(3)/quaternion maps, pose retractions, and small factorizations and solves at high rates.
- **GPU simulation and sampling-based planning**, where batches of hundreds to thousands of small problems are evaluated and keeping intermediates on chip avoids extra kernel launches.
- **Any embedded deployment where numerical code is duplicated across application kernels**, including edge devices where GLASS's advantage over PyTorch and JAX reaches 73× rather than the 12× seen on a workstation.

Industry relevance centers on the edge: the largest relative gains occur on power-constrained Jetson-class hardware, which is exactly where robotics products deploy. Because the same placement table survives power-mode changes (only 9 of 396 decisions change between 50 W, 30 W, and 15 W), a single validated configuration can ship across power profiles, and tuning is a one-time 2–9 hour offline cost per architecture.

## Future Directions

- **Provably correct reduced- and mixed-precision support**, building on recent tooling infrastructure the paper cites.
- **Broader factorization support** beyond the currently covered routines.
- **Community-contributed architecture tables**, so tuning work on new GPUs is shared rather than repeated per project.
- **Non-NVIDIA accelerators**, extending the placement framework beyond the CUDA ecosystem; cross-vendor source portability is explicitly left as future work.

## Target Audience

GPU and systems programmers building robotics software, robotics researchers deploying perception, estimation, planning, or control on embedded GPUs, and library/infrastructure maintainers who need to decide between compiler frameworks, host-dispatched vendor libraries, and hand-written device code. It is also relevant to engineers responsible for numerical validation and CI in GPU codebases, and to readers interested in measurement-based performance portability more broadly — the design applies wherever small, structured numerical operations are embedded inside larger GPU kernels.

## Authors’ abstract

GPU robotics lacks the reusable numerical infrastructure of mature CPU stacks, instead relying on compiler frameworks that introduce overhead or repeatedly reimplementing numerical libraries. To address this, we introduce GLASS (GPU Linear Algebra Simple Subroutines), a header-only CUDA C++ library that provides thread-, warp-, block-, and NVIDIA-backed implementations of robotics-scale linear algebra and geometric computations under one composable device API. GLASS treats…

[The full abstract on arXiv](https://arxiv.org/abs/2609.28179)

[Read the original paper](https://arxiv.org/abs/2609.28179)

## Related papers

- [MR. POP: Multi-Robot Parallel Optimizing Planner for Almost-Surely Asymptotically Optimal Planning](https://robotics.world/paper/mr-pop-multi-robot-parallel-optimizing-planner-for-almost-surely-2609.30644) 2026-09-25 · cs.RO · Also by Brian Plancher
- [RAYA: Learning Where and When to Intervene for Robot Recovery](https://robotics.world/paper/raya-learning-where-and-when-to-intervene-for-robot-recovery-2609.21690) 2026-09-18 · cs.RO · Also by Brian Plancher
- [AccelMPC: High-Rate, Low-Power FPGA-Accelerated Model Predictive Control for Tiny Drones](https://robotics.world/paper/accelmpc-high-rate-low-power-fpga-accelerated-model-predictive-control-2609.09380) 2026-09-08 · cs.RO · Also by Brian Plancher
- [Efficient Learning of Differentiable MPC Policies on the GPU via Smoothed ADMM and First-Order Reinforcement Learning](https://robotics.world/paper/efficient-learning-of-differentiable-mpc-policies-on-the-gpu-via-2611.09937) 2026-10-13 · cs.RO · Also by Brian Plancher
- [SmolWAM: A Latent World-Action Model for Robotic Manipulation on Edge Devices](https://robotics.world/paper/smolwam-a-latent-world-action-model-for-robotic-manipulation-on-edge-2610.13740) 2026-10-09 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/glass-architecture-tuned-composable-device-side-linear-algebra-for-edge-2609.28179
