News Developer Tools

NVIDIA TensorRT Tuner Tests Build Routes for Faster Engines

NVIDIA's TensorRT Global Performance Tuner builds and measures candidate configurations, dropping any that fail accuracy checks, to pick the fastest.

NVIDIA's Global Performance Tuner in TensorRT automatically tests many build configurations and keeps the fastest one that stays accurate. NVIDIA says tuning improved end-to-end performance by 1.14x to 1.63x over the default build across ten evaluated workloads.

TensorRT is NVIDIA's software for compiling AI models to run quickly on its GPUs. The tuner treats each alternative scheduling strategy as a build route, which is a specific combination of compiler knobs. A knob is a setting that changes how the compiler works, such as a fusion decision. TensorRT exposes more than 200 knobs, each with allowed values and a default. With no route specified, every knob keeps its default.

The trtexec command-line tool runs the tuning loop. It expands a route expression into concrete routes, then builds and measures each candidate. Routes that crash or fail the accuracy check are discarded, and the fastest remaining engine is selected. Accuracy acts as a filter, while speed ranks the eligible routes.

C++ APIs let users apply a fixed route, inspect the current one, and list the full tunable space. NVIDIA advises using –dryRun to preview routes, and –tuningCacheFile with –continue to make tuning resumable. It also recommends re-tuning after changes to the model, input shapes, target GPU, or software stack.

Source: Scaling NVIDIA TensorRT Performance Optimization Beyond a Single Build Route with the Global Performance Tuner, Part 2 | NVIDIA Technical Blog.