Table of Contents
Shortcuts

# 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.compile`

- Compiling a Transformer using torch.compile and TensorRT: Compiling a Transformer model using `torch.compile`

- Dynamo Compile Advanced Usage: Advanced usage including making a custom backend to use directly with the `torch.compile` API

Compiling ResNet using the Torch-TensorRT Dyanmo Frontend

Compiling ResNet using the Torch-TensorRT Dyanmo Frontend

Compiling a Transformer using torch.compile and TensorRT

Compiling a Transformer using torch.compile and TensorRT

Dynamo Compile Advanced Usage

Dynamo Compile Advanced Usage

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.