Dynamo / torch.compile¶
Torch-TensorRT provides a backend for the new torch.compile API released in PyTorch 2.0. In the following examples we describe
a number of ways you can leverage this backend to accelerate inference.
Compiling ResNet using the Torch-TensorRT torch.compile Backend: Compiling a ResNet model using the Torch Compile Frontend for
torch_tensorrt.compileCompiling a Transformer using torch.compile and TensorRT: Compiling a Transformer model using
torch.compileTorch Compile Advanced Usage: Advanced usage including making a custom backend to use directly with the
torch.compileAPITorch Compile Stable Diffusion: Compiling a Stable Diffusion model using
torch.compile
Compiling ResNet using the Torch-TensorRT torch.compile Backend
Compiling a Transformer using torch.compile and TensorRT