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 Dyanmo Frontend: Compiling a ResNet model using the Dyanmo Compile Frontend for
torch_tensorrt.compileCompiling a Transformer using torch.compile and TensorRT: Compiling a Transformer model using
torch.compileDynamo Compile Advanced Usage: Advanced usage including making a custom backend to use directly with the
torch.compileAPI
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
Compiling a Transformer using torch.compile and TensorRT