GLASS: Architecture-Tuned, Composable, Device-Side Linear Algebra for Edge Robotics and Beyond
Reusable numerical infrastructure for GPU robotics brings composable linear algebra and geometry together with hardware-specific tuning and independent validation, so applications don’t have to rebuild their numerical libraries.
Build the numerical layer once. Reuse it inside your kernels.
GLASS (GPU Linear Algebra Simple Subroutines) is a header-only CUDA C++ library that brings linear algebra and robotics geometry into application GPU kernels. Applications reuse one composable API instead of maintaining their own numerical implementations.
Applications call shared numerical routines while retaining control of kernel launches and problem indexing. Adapted from the paper’s overview.
Reuse inside your kernels
Call linear algebra and geometry routines directly from GPU code without adding a host call for each operation. Shared conventions make routines composable, with intermediate results kept on chip where the composition allows.
Tune for your hardware
Offline measurements compare thread, warp, block, and NVIDIA-backed implementations. Choices are resolved at compile time. Standard calls retain block-level execution, while glass::recommend<> lets applications adopt a different execution scope and launch layout.
Validate independently
Numerical tests check implementations against NumPy, SciPy, Pinocchio, and mathematical identities. Signed records connect local GPU test results to the exact source code, so CPU-only CI can check that the results are current.
GLASS targets the small and medium-sized numerical problems embedded in robotics kernels, each small enough for one CUDA block. Larger dense problems that span blocks are generally better served by host-dispatched libraries.
What we measured. Jetson AGX Orin is the primary platform, with comparisons on AGX Xavier and RTX 5090. Placement measurements cover six operations, eleven sizes, three batch sizes, and two precisions, giving 396 cases per GPU. Each case is one combination of operation, size, batch size, and precision. Figures retain the paper’s measured data and scales.
Execution scope matters
Placement determines whether a numerical problem runs on one thread, one warp, or a whole block, and which implementation it uses. Across 132 Orin cases at batch 8192 in fp32 and fp64, the best placement is a median of 4.9× faster than the worst, with a maximum of 81×. The figure below shows the 66 fp32 cases.
Execution scope matters. Measured per-problem kernel time on Jetson AGX Orin (fp32, batch 8192); lower is faster. Crossing curves show why no single implementation wins across operations and sizes. Unavailable tiers are omitted per cell; NVIDIA warp reductions are characterized separately rather than included in this ladder.
The measurements also explain why GLASS includes both native and NVIDIA-backed implementations. Across all three batch sizes, native GLASS wins 99 of 195 comparable fp32 cases. NVIDIA implementations are selected or fall within the selection tolerance in the other 96.
Different hardware changes the best placement
The same operation can favor a different implementation on another GPU. Recommended placements change in 145 of 396 cases between Orin and RTX 5090, and in 162 of 396 between Orin and Xavier.
Xavier’s CUDA 11.4 toolchain lacks the NVIDIA device libraries evaluated here. Comparing only native implementations still changes 107 of 396 recommendations between RTX 5090 and Orin, and 66 of 396 between Orin and Xavier.
Recommended fp32 placements. Orin is the shaded center row; black outlines mark departures from its recommendations. The 396-cell counts also include fp64.
Reusing another GPU’s native placement and launch configuration adds 4–20% to geometric-mean runtime, depending on the source and target GPU. At the 95th percentile, slowdowns reach 2.59×. Retuning lets applications keep the numerical interface while adapting execution to their hardware.
Rows are source hardware; columns are target hardware. One Orin fp64 GEMM plan exceeds RTX 5090 shared-memory capacity, leaving 395 transferable cells in that direction.
See the Eigen and Kokkos comparisonsWithin the measured overlaps, Eigen comparisons split 36 GLASS wins / 64 ties / 26 Eigen wins. Kokkos comparisons split 119 / 36 / 7, using the paper’s 5% margin.
Compared with the faster of PyTorch and JAX in each measured case, native GLASS reaches 73× speedup on Orin versus 12× on RTX 5090. GLASS is faster in 359 of 378 Orin cases, with geometric-mean speedups of 4.3–9.5×, and in 320 of 378 RTX 5090 cases, with geometric-mean speedups of 1.5–2.6×.
These comparisons cover GEMM, POTRF, and POSV across nine sizes, seven batch sizes, and fp32/fp64. Only native GLASS implementations are used. The figure shows the fp32 results against both host libraries and compiler frameworks.
Baseline time / native GLASS time; above one favors GLASS. Inputs and outputs are device-resident and framework code is precompiled/jitted. Colors are clipped at 16×; the true maximum is 113.9×. The displayed fp32 grid is a subset of the 378-cell population.
Against cuBLAS/cuSOLVER in fp32, GLASS is faster at every measured batch size for POSV through N=64, GEMM through N=48, and POTRF through N=24. Peak speedups are 113.9×, 12.1×, and 12.8× respectively. These ranges apply to the measured fp32 cases. Host libraries regain an advantage for some larger problems.
Robotics-aware composition
Reuse the same routines. Measure how to combine them.
An LQR feedback gain can use the same GLASS primitives in one fused kernel or in a sequence of kernels. Fusion keeps intermediate results on chip, while separate kernels can use GPU resources more efficiently. On Orin, fusion is up to 1.75× faster at small batches. Separate kernels win by up to 2.9× at larger batches and in resource-heavy fp64 cases.
Unfused GLASS / fused GLASS runtime on Orin. Above one favors fusion. Color identifies (state size, input size); solid curves are fp32 and dashed curves fp64.
Robotics operations gain 3.5–9.7× over whole-block execution
Orin, fp32, batch 4096. Times are ns/problem. Each ratio compares whole-block execution with the fastest measured scope.
Robotics operation placement measurements
Operation
Block
Warp
Thread
Block / best
quat_retract
10.291
5.752
2.869
3.6×
se3_retract
14.768
9.930
4.152
3.6×
quat_error
8.589
4.819
2.330
3.7×
motion_cross_mul
12.092
7.322
3.417
3.5×
eig3
62.519
46.891
8.012
7.8×
svd3
77.071
56.280
11.831
6.5×
closest_rotation
77.777
57.386
8.005
9.7×
argmax (n=16)
16.208
4.823
1.980
8.2×
softmax (n=16)
14.717
4.224
11.759
3.5×
Validated reuse
Replace custom numerics. Keep the surrounding algorithm.
Integrating GLASS into published robotics systems turns repeated numerical code into shared library calls. The case studies show faster embedded computation and less application-specific code, with independent validation also exposing a pre-existing bug.
Faster sampling-based MPC kernels
In MPPI-Generic, GLASS replaces custom reductions while preserving the surrounding algorithm and public interface. The replaced computation runs 1.21–1.50× faster on Orin over 128–8192 rollouts, and 1.21–1.46× faster on RTX 5090.
The integration also exposed a normalization bug, and the repair was accepted upstream. Speedups are measured against the corrected baseline and cover the replaced computation, not a complete controller cycle.
Less code for inverse kinematics
In HJCD-IK, GLASS replaces approximately 355 lines of specialized numerics with 29 lines of application code, a 92% reduction.
At batch 2,000, Orin runtime falls from 9.94 ms to 7.92 ms, a 1.26× speedup. The corresponding RTX 5090 speedup is 1.02×.
Interfaces and hardware
One numerical interface, tuned for the target GPU.
Platforms evaluated in the paper
GPU
Architecture
Evaluated CUDA
Candidates
Jetson AGX Orin
sm_87
13.2
Native + supported NVIDIA paths
Jetson AGX Xavier
sm_72
11.4
Native only
RTX 5090
sm_120
13.2
Native + supported NVIDIA paths
GLASS covers vector and matrix operations, factorizations and solves, structured systems, spatial algebra, rotations, poses, quaternions, and projections. The API reference lists the execution scopes and optional dependencies available for each operation.
Applications keep the same numerical interface while retuning for another NVIDIA GPU. The paper’s offline tuning runs took 5.5 hours on Orin, 9 on Xavier, and 2 on RTX 5090.
Power settings changed runtime much more than placement on the measured Orin. Compared with 50 W, the 30 W and 15 W modes increased geometric-mean runtime by 29% and 91%, while each changed only 9 of 396 recommendations.
Get started
Include GLASS in your CUDA code.
git clone https://github.com/A2R-Lab/GLASS.git
#include "glass.cuh"
// All threads in the block participate in one problem.
__global__ void saxpy_kernel(uint32_t n, float a, float *x, float *y) {
glass::axpy(n, a, x, y);
}
// Launch from host code with allocated device buffers:
// saxpy_kernel<<<1, 256>>>(n, 2.0f, d_x, d_y);
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 implementation choice, execution scope, and launch packing as architecture-specific placement decisions determined by offline measurement and resolved statically at compile time. This is critical as the best and worst placements differ by a median of 4.9× (max 81×), with 145 of 396 recommended placements changing between a Jetson AGX Orin and an RTX 5090, and 162 of 396 versus an AGX Xavier. These stakes are highest at the edge as GLASS's advantage over the best of PyTorch and JAX is as much as 73× on the Orin versus 12× on the RTX 5090. GLASS is released open source with independent numerical oracles and source-bound local-GPU test attestation. Finally, integrating GLASS with published robotics systems both exposed a pre-existing numerical bug and improved embedded runtimes by up to 1.5×.
The placement-spread statistic covers 132 Orin cells at B=8192 across both precisions. See the result sections above for populations and comparison scope.