Back to articles

ExecuTorch-TensorRT Brings PyTorch Robot Policies to the Edge

3 min read

Why robot deployment is difficult

A robot policy must produce its next action chunk before the current one runs out. Cloud inference introduces network latency and depends on a connection that may not be reliable, while onboard computers have limited memory and compute shared among models, cameras, CPUs, and GPUs. PyTorch’s new ExecuTorch-TensorRT workflow targets this trade-off: keep model development in PyTorch, but deploy through a smaller runtime that can use NVIDIA TensorRT.

A path from PyTorch to a device

With Torch-TensorRT 2.15 and ExecuTorch 1.6, a model can be captured with torch.export, compiled into TensorRT engines where supported, and saved as an ExecuTorch program. The workflow avoids an ONNX conversion step. On the target device, the program runs through ExecuTorch and a TensorRT backend, without loading PyTorch or libtorch. The runtime can be called from C++ or Python.

The approach also accommodates operations TensorRT cannot convert. The compiler assigns supported sections to TensorRT and can send other sections to ExecuTorch’s CUDA backend. Both run within the same program; tensors passed between them can stay on the GPU rather than making a round trip through the CPU. For custom operations that neither backend handles, the post describes implementing them as Triton kernels and registering them for compilation by the CUDA backend, instead of writing a TensorRT plugin in C++.

Reported results—and the caveats

PyTorch says the workflow came within 4% of the fastest TensorRT setup it measured in both speed and memory on an NVIDIA Jetson Orin Nano. Its post also says a 3.6-billion-parameter policy fits on the board’s 8GB of memory, while PyTorch eager mode runs out of memory. A further example, GR00T 1.7 (3B), is reported at about 200 milliseconds per action chunk. These are results from the blog’s tests, not a guarantee for other models, workloads, or configurations.

The deployment path has non-trivial requirements. The wheels target CUDA 13.2 on Linux x86-64 and Arm64; Jetson users need JetPack 7.2 or later. Torch-TensorRT 2.15 requires TensorRT 11.4, whereas JetPack 7.2 ships with TensorRT 10, so the installed JetPack version cannot simply be reused. On Arm64, the first installation also downloads about 2.6GB of TensorRT libraries. Exporting a program that uses the CUDA backend requires the CUDA Toolkit, including nvcc.

What changes for robotics teams

The main contribution is a more direct deployment route: model capture, backend partitioning, packaging, and a runtime without libtorch are connected in one workflow. That may reduce the need to debug ONNX conversion gaps or rebuild networks manually in TensorRT. It does not remove the need to validate a specific policy on its target board. Operators, memory pressure, latency under the full robot workload, and action continuity still need to be tested before relying on the model in real-time operation.

Source: PyTorch Blog

Comments

Checking sign-in status...

Loading comments...

Related articles