Torch-TensorRT is a compiler for PyTorch/TorchScript models targeting NVIDIA TensorRT. Version 2.12.0 supports Python 3.10+. It automatically optimizes models for inference on NVIDIA GPUs. Release cadence roughly quarterly.
pip install torch-tensorrtNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compile a PyTorch model using Torch-TensorRT with default settings.
Use `torch.jit.trace` or pass module directly to `torch_tensorrt.compile` with `ir="torch_script"` or `ir="dynamo"`.
Replace `import torchtrt` with `import torch_tensorrt`.
Use `torch.dtype` values in the set: `{torch.float32, torch.float16}`.Check compatibility matrix in official docs. Install `tensorrt` via `nvidia-tensorrt` pip package or use Docker containers.