All the algorithms are developed. It’s now time to move them onto the target hardware. Of course, the target platform and its capabilities were considered from the very beginning; otherwise, it would be a little too late to think about that now!
I’ve already spent quite a bit of money on this project, and with NVIDIA’s sudden 40% price increase on Jetson evaluation boards last July (from 60% to 100%), I decided to borrow a Jetson AGX Orin from a friend instead.
The AGX Orin is definitely overkill for this project, but the runtime figures I’ll be sharing should be representative of the entire Orin family. The main exception is the Deep Learning Accelerator (DLA), which is only available on the AGX Orin and Orin NX modules.
Before getting into the actual optimization, I’ll take a quick look at the Orin hardware specifications, then walk through the optimization process and, finally, explain how the different processing tasks are scheduled.
Orin specifications
On NVIDIA’s website, the AGX Orin is advertised as delivering up to 275 TOPS. However, AI performance varies significantly across the different Orin variants. So does the price, ranging from $399 USD for the Orin Nano to $3,499 USD for the AGX version.
Out of curiosity, I decided to compare the cost per AI TOPS for each variant. Surprisingly, both the Nano and NX come in at around $6 per TOPS, whereas the AGX reaches approximately $12 per TOPS.
Interestingly, the main additional feature of the Orin NX compared to the Nano is the DLA (Deep Learning Accelerator). If your application doesn’t need the DLA, or if your models cannot take advantage of it, the Nano might actually be the better deal.
So, let’s see how far we can push our optimization efforts. Who knows, we might even manage to get everything running on an Orin Nano!

To understand why optimization, and quantization in particular, matters so much, we first need to understand what TOPS (INT8) actually means.
For the AGX Orin, the advertised 275 TOPS represents the combined INT8 computing throughput of the GPU Tensor Cores and the two Deep Learning Accelerators (DLAs). Roughly speaking, the GPU Tensor Cores contribute 170 TOPS, while the two DLAs provide the remaining 105 TOPS.
The important point here is that these figures are expressed in INT8 operations. However, not all architectures and layers can run in INT8, particularly Transformers, and fully exploit the DLAs.
This raises an interesting question: how do these performance figures translate to other formats, such as FP16 and FP32?

These numbers are highly optimistic theoretical figures. In practice, many other factors come into play, such as memory bandwidth, data transfer, and other hardware bottlenecks that go beyond my current understanding!
Anyway, one thing seems clear: FP32 is probably out of the picture for our application. FP16 is the natural default choice, while INT8 quantization could potentially unlock additional performance by making better use of the hardware accelerators.
Optimization
The good thing is Nvidia provides a full ecosystem to develop, optimize and deploy models. In the next steps, I used TensorRT for model quantization and weight calibration, and in last resort when things went super wrong, Polygraphy to check intermediate layer results.
LATR

INT8 running on the GPU turns out to be the winner! There is no benefit in offloading part of the execution to the DLA. The LATR backbone is relatively lightweight, and splitting the processing between the DLA and GPU (where the Transformer runs) introduces additional overhead that outweighs the potential gains.
LLTR

Same architecture as LATR, so conclusion are the same.
LeAD-M3D

Unfortunately, all INT8 variants failed. The predicted bounding boxes (yellow) were significantly off compared to the baseline (green).

Obj4D

Same architecture as LeAD-M3D, so conclusion are the same.
RadarNet

I haven’t spent enough time investigating, but I suspect the INT8 variants failed because a few bounding boxes were missing. Looking at some of the predictions, the results actually look quite promising. I think it would be worth taking a closer look; there might still be some room for improvement!

Summary
After optimization, the total GPU runtime is approximately 20 ms and an estimated AI compute requirement of 14 TOPS, compared to the Orin AGX’s 85 TOPS of dense AI computing capacity.
It’s rather disappointing that the DLA never turned out to be useful. It accounts for roughly 40% of the Orin AGX’s overall AI computing capacity, which means we’re effectively leaving a significant portion of the hardware unused.
However, looking at the bright side, since we’re not using the DLA at all, and based on the specifications, all five models should comfortably fit on an Orin Nano (33.5 TOPS, dense), with some computing headroom left for additional tasks!

Scheduling
The runtimes presented earlier corresponded to model inference only. They did not account for pre-processing, post-processing, or CPU tasks such as tracking and sensor fusion.
The table below provides an estimate of the overall application runtime, taking these additional operations into account.

At this point, we need to decide where and when each task should be executed.
Since we still have plenty of computing headroom on the Orin, and most of the processing runs on the GPU, I decided to keep the scheduling strategy as simple as possible.
The entire pipeline runs at 10 Hz, with all sensor processing synchronized to the slowest sensor: the LiDAR.

With the camera running at 30 Hz, pre-processing (15 ms) can start as soon as each frame arrives. Moreover, much of this processing is spent on color conversion and decompression. Using a CSI camera with the Orin Nano could eliminate these steps altogether.
Finally, there is still plenty of room for optimization, as I haven’t yet explored shared encoders across sensors or multi-head architectures.

Leave a Reply