🧠
Domain 1 · Essential AI Knowledge · 38% of the exam

TensorRT: making trained models fast

How NVIDIA's inference optimiser turns a trained model into a lean engine for a specific GPU, and the four products that share the TensorRT name.

Lesson 6 of 29~12 min read4 quiz questions5 key terms
Exam objectives this lesson covers
  • Describe the NVIDIA software stack used in an AI environment.
  • Explain the purpose and use case of various NVIDIA solutions.
  • Compare and contrast training and inference architecture requirements and considerations.

TensorRT is NVIDIA's answer to a simple problem: the model that comes out of training is written for flexibility, not speed. TensorRT takes that trained model, studies it together with the exact GPU it will run on, and produces an engine: a version of the model rewritten to run as fast and as small as possible on that hardware. It is built on CUDA and used only for inference.

Trained modelPyTorch · ONNXQuantiseFP32 → FP8/INT8/FP4Fuse layersconv+bias+ReLU → 1Tune kernelspick fastest for this GPUBuild engineserialized planTensorRT engine served by Triton · NIM · Dynamolower latency · higher throughput · less memoryOptimisation happens once, ahead of serving
Fig 1. The TensorRT build pipeline. Each optimisation step lights up in turn; the result is an engine that a serving layer loads.

01The optimisations, in plain words

02One name, four products

The TensorRT page now describes a family of inference SDKs. Know which is which:

ProductUse it for
TensorRTClassic (non-generative) models such as vision and speech, in a C++ or Python production stack
TensorRT-LLMLarge language models and generative AI in the data center or cloud; open source, Python-friendly
TensorRT Edge-LLMGenerative AI on embedded GPUs at the edge
TensorRT for RTXAI features inside Windows applications on RTX PCs; small library and fast engine builds

Next to them sits the NVIDIA Model Optimizer, a library for quantisation (both post-training and quantisation-aware training), pruning, sparsity, distillation and speculative decoding. It prepares models for TensorRT-LLM, TensorRT and also open engines like vLLM and SGLang.

03How models get into TensorRT

# typical command-line build of an engine from ONNX (illustrative)
trtexec --onnx=model.onnx --saveEngine=model.plan --fp16

04Where the engine runs

TensorRT does not serve requests by itself in production. The engine is loaded by a serving layer: Triton Inference Server (TensorRT is one of its backends), NVIDIA Dynamo for distributed serving, or packaged inside a NIM microservice. NVIDIA's page quotes large speed-ups versus CPU-only inference and versus unoptimised GPU runs; treat the exact multipliers as vendor claims, but expect the exam to know that TensorRT significantly cuts latency and raises throughput.

A tailor. Training produces an off-the-rack suit that fits many people roughly. TensorRT measures one specific person (the GPU) and alters the suit to fit them exactly: lighter material (lower precision), fewer seams (fusion), cut for their shape (kernel tuning).

✦Key terms: flip the cards

What the exam looks for
  • TensorRT is an inference optimiser and runtime, not a training tool.
  • Optimisations: precision calibration/quantisation, layer fusion, kernel auto-tuning.
  • Engines are served through Triton, Dynamo or NIM.
Common traps
  • An engine built for one GPU type is not automatically optimal (or valid) on another.
  • TensorRT-LLM is for LLMs; plain TensorRT for non-generative models.

?Quick quiz

1. What is TensorRT's primary role?

Why: TensorRT optimises and runs trained models for inference.

2. Which optimisation reduces memory traffic by merging operations?

Why: Fusion combines operations into a single kernel.

3. A team exports a PyTorch model to a framework-neutral file for TensorRT. Which format?

Why: ONNX is the common import path via the TensorRT parser.

4. Which product targets LLM inference specifically?

Why: TensorRT-LLM is the LLM-focused member of the family.

Score: 0 / 4

Original readingNVIDIA TensorRT, NVIDIA Developer ↗

This lesson explains the reading in plain language and adds the exam context around it. Read the original too: it is short, and seeing the vendor wording helps on exam day.

All lessons →
↑