Robots Won't Wait: Inference on a Deadline
How CUDA graphs made requests 2.3x faster for pi0.5 and GR00T N1.7 on the same GPU, and what happens when a robot fleet pushes past capacity
What this post measures. Speed and server policy only: latency, capacity and cost. It does not measure the quality of the actions, or whether a robot completes its task. “On time” means the reply arrived before the deadline, not that the action was right.
A robot does not wait for a slow answer. It keeps moving, and the action arrives for a world that has already changed. So a server for a robot fleet works against a deadline, and I wanted to know where that time goes.
I expected the GPU to be the bottleneck. It was for one kind of model and not for another. Then I found something I had not looked for. On the fastest GPU I tested, serving one robot at a time, it spent about half of each request doing nothing.
One change fixed most of it. On the same GPU, with the same trained weights, a pi0.5 request went from 143 ms to 63 ms and a GR00T N1.7 request went from 68 ms to 29 ms.
This is what I tested, what surprised me, and what I got wrong.
The setup
Each simulated robot sends two small camera pictures and six joint values, and needs an action back before a deadline. I treat a late action as a stale action. How stale is too stale depends on the robot and the task, and I did not measure it. The deadline is an assumption I took as given: 200 ms for the small model and 500 ms for the large models. A reply a little past the deadline may still be partly usable, because each reply holds a chunk of future steps. I count it as late anyway.
I put a gateway server in front of one GPU, drove it with robots that send on a fixed schedule whether or not the server keeps up, and added network delay, loss and blackouts with tc netem. The tests used rented AWS GPUs: g7e (RTX PRO 6000 Blackwell), L40S and L4.
With a small model, the network eats the budget
I started with a small vision model. At 60 ms of added round trip, a reply took 76 ms. The network took 61 of it. Queueing took 6. JPEG decoding on the CPU took 5. The GPU took 3.4, which is 1.7% of a 200 ms budget.
I had written a stop rule before running anything. If the GPU was under 10% of the budget, scheduling would not matter much and I should rescope. It fired. The GPU did not matter.
Moving the decode onto the GPU raised capacity from 1,110 to 1,780 requests per second at the deadline. That cut the cost per million on-time actions from $0.20 to $0.13.
A ResNet is not what most arm teams run now. Large vision-language-action models are. So I tested two of them, in plain PyTorch, the way most teams start: pi0.5 with 10 denoising passes and GR00T N1.7 as released, with 4 passes.
With a large model, the GPU eats the budget
One robot, one request, median:
| GPU | pi0.5 | GR00T N1.7 |
|---|---|---|
| g7e | 142.6 ms | 67.5 ms |
| L40S | 242.8 ms | 119.8 ms |
The g7e row uses trained weights. The L40S row uses random weights. Add the 61 ms of network time and pi0.5 on g7e is at 204 ms before a single request waits in a queue. I added two medians instead of running it end to end, and it is still enough. A 200 ms budget is gone.
Half of it was waiting
143 ms is a lot of time for a GPU this fast. So I looked inside with the profilers.
For pi0.5 on g7e, the GPU was busy about 45% of the request by Nsight and 50% by NVML. The rest was gaps. Serving one robot at a time, L40S showed the same pattern. The L4 did not, at 61 to 65% busy, because its kernels run longer.
pi0.5 launches 13,456 GPU kernels for one request. Most of them are tiny, about 2 microseconds each. Launching a kernel takes the CPU about 5 microseconds in a direct test, longer than most of these kernels run. Under the profiler the CPU spent about 48 ms of a request inside launch calls. So the GPU runs a kernel, finishes, and waits for the next one.
A faster GPU would shorten the matrix multiplies, which are about two thirds of the GPU time. It would do nothing for the waiting.
A CUDA graph fixed most of it
A CUDA graph records the whole list of kernels once and replays it with a single launch. Think of a record player. Without a graph, the CPU is a speaker reading a long script aloud, and the GPU has to wait for each line. With a graph, you record the script once, and after that one press of a button plays the whole thing through. Like a record, it can only play what was recorded.
I recorded all three stages of both models: the vision encoder, the language backbone and the denoising loop. This was not free. A graph needs fixed shapes, fixed memory addresses and no reads back to the CPU while recording. The library code for GR00T reads values back in many places, so I wrote a capture-safe version of its backbone.
Same GPU, median ms, one robot unless stated:
| Normal | Graph | Speedup | |
|---|---|---|---|
| pi0.5, g7e, trained | 142.6 | 62.6 | 2.3x |
| GR00T N1.7, g7e, trained | 67.5 | 29.3 | 2.3x |
| pi0.5, L40S, random | 242.8 | 81.4 | 3.0x |
| GR00T N1.7, L40S, random | 119.8 | 36.0 | 3.3x |
| pi0.5, L4, random | 311.2 | 214.4 | 1.5x |
| pi0.5, g7e, trained, batch of 8 | 277.1 | 254.8 | 1.1x |
| GR00T N1.7, g7e, trained, batch of 8 | 104.0 | 66.9 | 1.6x |
The GPU kernel time barely moved, 63.2 ms to 60.9 ms for pi0.5. The gain is waiting that went away. NVML busy share went from 50% to 98%.
The L4 gains less because waiting is a smaller part of each request there. Before the run I wrote down a guess of 198 ms for pi0.5 on the L4. That host has 4 vCPUs, and the GPU has 24 GB of memory. The profiler showed the GPU idle for about 39% of a request, about 130 ms of the 328 ms in that run, so I took the idle time out. I used the same method on g7e. The result came back at 214.4 ms. I was 8% low, and the same method had been 8% high on g7e.
At a batch of 8, pi0.5 gains only 8%, because the GPU is already busy over 90% of the time. A graph removes waiting. When there is no waiting, it has nothing to remove. GR00T still gains 36% at that size, so this depends on the model.
A faster request is only useful if the answer is the same. With trained weights, the same pictures, tokens and noise through both paths, 8 seeds, pi0.5 actions differ by at most 0.007 in normalized units, and GR00T actions by 0.0. In the GR00T check the output moved about 1.0 away from the starting noise and changed with the picture, so the check could have failed.
It did fail once. My first pi0.5 graph kept reading a small attention tensor that nothing held on to. Once that memory was freed, later work could overwrite it, and the graph gave wrong actions with no error, off by up to 2.25. It only showed at a shorter action length, in a check I added late. The timing was not affected, and the sweeps below never used the actions, but those pi0.5 sweeps ran the old code. If you use graphs, compare outputs on every shape you ship. Silent wrong answers are the failure mode to fear here.
Speed barely depended on the weights. Trained and random runs on the same setup were within about 5%, and within 1% for GR00T.
When too many robots ask
One GPU can only serve so many robots. What a server does past that point decides how many answers still arrive on time. I loaded one g7e with robots at 2 requests per second each, a 500 ms deadline and 60 ms of added round trip. “On time” means the reply arrived before the deadline. It says nothing about whether the action was right. Capacity is the highest load where the server keeps 99% on time.
| Robots on one g7e, 60 ms added | Normal | Graph |
|---|---|---|
| pi0.5 | 8 holds, 12 fails | 15 holds |
| GR00T N1.7 | 51 | 70 |
For GR00T the search ran at 60 ms. For pi0.5 it ran with no added delay and found 12 normal and 15 graph, then the sweeps at 60 ms showed the table above. Nothing was tested between 8 and 12.
One robot was 2.3 times faster. A full GPU with GR00T serves 1.4 times as many robots. A fleet runs at large batches, where a graph helps less, so the single-robot number does not carry over to fleet capacity.
Past capacity, a plain first-in-first-out queue (I call it S0) falls apart. At 1.3 times capacity it answers nothing on time, for both models, with or without graphs. The queue grows, every wait is longer than the deadline, and the GPU keeps working on requests nobody can use. The edge is sharp. With graphs at 71 robots, one robot past capacity, S0 gets 8% on time and deadline-aware shedding (S3) gets 98.7%.
Dropping stale work holds the line. Offered twice its capacity, S3 delivers 137 on-time answers per second for GR00T with graphs, out of a ceiling of 140, and 99 of 102 without. For pi0.5 with graphs it delivers 24 of 30, and 14 of 24 without.
Then there was the result I got wrong. In the normal run for pi0.5, the clever policies did worse than the plain queue at 12 robots. 0.46 on time against 0.83. I had written the cause myself. A request may only join a batch if the predicted finish time of the whole batch fits the tightest deadline in it. The predicted time grows with batch size, so my rule kept batches small, about 2.4 requests on average against 5.7 for the simple bounded queue. In normal PyTorch, a small batch wastes the GPU, because every request carries the full launch cost. Goodput fell to 11 requests per second against about 20.
I predicted this problem would stay with graphs. It did not. With graphs, S3 reached 1.000 on time at 15 robots. My best explanation is that graphs make small batches far cheaper. In normal PyTorch, a request in a batch of 1 costs 4.0 times what it costs in a batch of 8. With graphs, it costs 1.9 times. I did not prove this is the cause. A policy can look broken when the real problem is underneath it. I still would not trust that rule. It depends on a measured time curve for one model, one build and one GPU. A model update can bring the problem back.
One more thing that did nothing. Keeping only the newest request per robot made no difference at 2 requests per second, because no robot had two requests waiting. It did help the small model at 10 requests per second and twice capacity, 844 on-time answers per second against 423.
When the network drops
These runs used the small model, 78 robots at 10 Hz. Robot behaviour here is scored from the recorded replies after each run, not from live arms.
A 2-second blackout every minute. In every setup, every robot stopped about 0.4 seconds after the blackout started. That part was fine. Recovery was the problem.
My robot-side rule held the last action on a miss and stopped after three misses in a row. It estimated the round trip from served replies only. After one blackout the estimate rose above the deadline, so it sent requests with a budget of one microsecond. The server shed all of them. The estimate never got a reply to correct itself. With my best server policy almost no robot recovered, and the on-time share was 0.25.
The fix was to learn the round trip from shed replies too, and to cap the correction at half the budget. Then the same server recovered in about 0.9 seconds and the on-time share was 0.96. I found this by measuring. I did not design it in.
Recovery here means replies arriving on time again. While the robot holds its last action, the arm repeats an old command. What that does to the task, I did not measure.
What it costs
What a million on-time actions costs in GPU rent, running one g7e at the most robots it can serve with 99% on time and 60 ms of added delay. Client machines and networking are not included.
| Robots | Actions per second | Actions per hour | Cost per million | |
|---|---|---|---|---|
| pi0.5, normal | 8 | 16 | 57,600 | $58.39 |
| pi0.5, graph | 15 | 30 | 108,000 | $31.14 |
| GR00T N1.7, normal | 51 | 102 | 367,200 | $9.16 |
| GR00T N1.7, graph | 70 | 140 | 504,000 | $6.67 |
The arithmetic is simple. The GPU rents for $3.3631 per hour whatever it does, so more actions per hour means a lower cost per action. For GR00T with graphs, 140 actions per second is 504,000 per hour, which works out to $6.67 per million. Graphs cut the cost by 47% for pi0.5 and 27% for GR00T. For pi0.5 normal, 8 robots passed and 12 failed, with nothing tested between, so its true cost could be somewhat lower.
Compare normal against graph for the same model, because that is the same work done with less waiting. pi0.5 against GR00T is not a comparison of value. They are different models, I did not measure the quality of either, and a cheaper action is only a better deal if it is as good. Do not read this table as “choose GR00T.”
For 5,000 robots at 2 requests per second, 10,000 requests per second, the arithmetic is 334 GPUs for pi0.5 with graphs (625 without) and 72 for GR00T (99 without). With graphs that is about $1,123 and $242 per hour at on-demand prices. It is not a design. It has no headroom, no router and no second region. If you want to survive losing half your GPUs with no loss, double it. Whether a smaller spare share and some shedding is acceptable is a business and safety decision.
The whole study cost about $71 in rented compute.
What I did not measure
Everything here is about speed and policy. I measured that a graph keeps the outputs the same. I did not measure whether those outputs are good, and two different models are not interchangeable for a given robot without their own validation. Specifically, I did not measure how late an action can be before the task suffers, or what holding the last action during a blackout does to task success. Inputs for the trained-weight checks were my own sim pictures with arbitrary tokens, not a real prompt on a real robot.
The load tests used random weights, 2 pictures per request and sdpa attention. The released GR00T setups take 2 frames per view and use flash attention. With 4 pictures, one robot takes 71.1 ms normal and 33.1 ms with graphs, and a batch of 8 takes 145 ms and 98 ms, so capacity there would be lower. I did not measure it. Flash attention took 74 ms for one robot and 99 ms for a batch of 8. It would not record into a graph, so graph runs use sdpa.
Action length barely mattered for pi0.5. At 16 steps instead of 50, one robot took 139.9 ms normal and 58.2 ms with graphs.
This is plain PyTorch. A tuned inference engine may leave much less waiting to remove.
Gateway sweeps ran on g7e only. L4 numbers exist for pi0.5 and not for the released GR00T. The GPU busy figures are for pi0.5. The blackout, loss and routing results come from the small model.
I did not test a router at 5,000 robots, a second region, failover or autoscaling speed.
Most large-model results are one session per setup, with 3 runs per load. One gateway process stopped by itself in a pi0.5 sweep, with no logged cause. I restarted it, and the cells before and after the restart used the same setup. The load 1 point for GR00T with graphs was set at 71 robots before the search was corrected, so it sits just past the true capacity of 70.
Related work
Jiang et al. (arXiv 2607.01088) schedule a shared GPU pool for SLO-qualified throughput, with robot-level admission and a capped request rate. They do not report request shedding or loss and blackout tests. Bansal et al. (arXiv 2608.00337, Armory) schedule batches by which robot runs out of actions first and sweep latency and jitter, on one L40S with simulated and real arms. My newest-request policy credits their use of the latest request per robot. They have no queue bound, shedding policy, or loss and blackout test. Adamopoulos et al. (arXiv 2609.12075, Robion) order requests by least remaining time and cap load per GPU by planning, with no queue bound, shedding, per-robot replacement, or loss and blackout test. Adib et al. (FirmVLA, NeurIPS 2026 workshop poster) look closest to robot-level admission and to my hold rule. I found only the listing, so I cannot say more. Triton’s dynamic batcher offers bounded queues and timeouts. As documented on 2026-10-30, a newer request from the same client cannot replace a queued one.
Gujarati et al. (OSDI 2020) show that general DNN serving can meet tight latency targets by relying on predictable execution times. My policies lean on the same idea, a measured time curve for each model.
The PyTorch documentation describes CUDA graphs as removing CPU overhead at replay, with fixed shapes, fixed memory addresses and no operations that synchronize CPU and GPU during capture. It also says to keep long-lived references to the tensors a graph uses, which is the rule my bug broke. The technique is not mine. The measurement is.
I do not claim nobody has measured on-time goodput against load for a robot fleet. I checked these sources and did not find the same combination.
Numbers and method
Setup. Robots send 2 JPEG pictures (224 by 224, about 15 KB for the pair) and 6 joint values, 2 to 10 times a second. The reply is an action chunk in half precision: 16 by 6 for the small model (192 bytes), 50 by 6 for pi0.5 (600 bytes), 40 by 6 for GR00T (480 bytes). The deadline counts from the scheduled send time on the robot’s clock. Load is open loop, and a run is invalid if the generator lags more than 1 ms at the 99th percentile. No run was invalid.
Runs. Each sweep cell is 3 runs, reported as the median with the range of the 3 runs in brackets. Large-model sweeps use 15 s of warm-up and 60 s of steady state, small-model sweeps 10 s and 30 s. Single-robot latency is the median of 30 requests in one session.
Software and prices. Large models: PyTorch 2.9.0, CUDA 12.8, bfloat16. Small model: PyTorch 2.14.1, CUDA 13.0, float16. GR00T N1.7 is the released configuration: 16 language layers and a 32-layer action model. On-demand prices from the AWS Pricing API: g7e $3.3631 per hour, L40S $1.861, L4 $0.8048. Hosts ran in two AWS regions, and repeat runs matched across them.
Policies. S0 plain queue. S1 queue bound, refuse at the door. S2 drop requests that are late or cannot finish. S3 close a batch when the tightest request runs out of slack. S4 newest request per robot only.
Small model waterfall (60 ms added round trip, 0.7 times capacity, median):
| Step | ms |
|---|---|
| Network, both ways | 61.2 |
| Queue and batch wait | 6.0 |
| JPEG decode on CPU | 5.3 |
| Host to device, compute, device to host | 3.4 |
| Gateway overhead | 0.2 |
| Total p50 | 76.2 [75.9, 76.4] |
| Total p99 | 101 |
Where a request goes inside the large models (g7e, one robot, trained weights, median ms, batch timers):
| Model | Software | Decode, copies, prepare | Vision | Language model | Denoising loop | Total |
|---|---|---|---|---|---|---|
| pi0.5 | normal | 1.1 | 16.5 | 18.4 | 106.7 | 142.6 |
| pi0.5 | graph | 1.1 | 10.2 | 17.4 | 34.0 | 62.6 |
| GR00T N1.7 | normal | 1.0 | 10.6 | 11.6 | 44.3 | 67.5 |
| GR00T N1.7 | graph | 1.0 | 4.9 | 4.6 | 18.7 | 29.3 |
On-time share at and past the top load (median [range of 3 runs]). Load 1 is the top load tested for each setup: pi0.5 12 robots normal and 15 graph, GR00T 51 robots normal and 71 graph.
| pi0.5 | Load 1 | Load 1.3 | Load 2 |
|---|---|---|---|
| S0, normal | 0.830 [0.822, 0.856] | 0.000 | 0.000 |
| S0, graph | 0.996 [0.994, 0.999] | 0.000 | 0.000 |
| S3, normal | 0.464 [0.455, 0.528] | 0.405 [0.395, 0.485] | 0.300 [0.224, 0.308] |
| S3, graph | 1.000 [0.998, 1.000] | 0.663 [0.654, 0.705] | 0.397 [0.386, 0.437] |
| GR00T N1.7 | Load 1 | Load 1.3 | Load 2 |
|---|---|---|---|
| S0, normal | 1.000 | 0.000 | 0.000 |
| S0, graph | 0.079 [0.010, 0.109] | 0.000 | 0.000 |
| S3, normal | 1.000 | 0.772 [0.769, 0.772] | 0.486 [0.482, 0.487] |
| S3, graph | 0.987 | 0.759 [0.758, 0.760] | 0.483 [0.482, 0.485] |
Blackout, 78 robots, 10 Hz, 2 s every 60 s:
| Server | Robot rule | On-time share | Recovery |
|---|---|---|---|
| S0 | holds, stops after 3 misses | 0.894 [0.871, 0.894] | about 5.1 s |
| S4 | same | 0.249 [0.067, 0.323] | almost never |
| S4 | learns from shed replies | 0.958 [0.947, 0.958] | about 0.9 s |