Here we provide examples of Torch-TensorRT compilation of popular computer vision and language models.
Please install the following external dependencies (assuming you already have correct torch, torch_tensorrt and tensorrt libraries installed (dependencies))
pip install -r requirements.txt- :ref:`torch_compile_resnet`: Compiling a ResNet model using the Torch Compile Frontend for
torch_tensorrt.compile - :ref:`torch_compile_transformer`: Compiling a Transformer model using
torch.compile - :ref:`torch_compile_stable_diffusion`: Compiling a Stable Diffusion model using
torch.compile - :ref:`_torch_compile_gpt2`: Compiling a GPT2 model using
torch.compile - :ref:`_torch_export_gpt2`: Compiling a GPT2 model using AOT workflow (ir=dynamo)
- :ref:`_torch_export_llama2`: Compiling a Llama2 model using AOT workflow (ir=dynamo)
- :ref:`_torch_export_sam2`: Compiling SAM2 model using AOT workflow (ir=dynamo)
- :ref:`_torch_export_flux_dev`: Compiling FLUX.1-dev model using AOT workflow (ir=dynamo)
- :ref:`debugger_example`: Debugging Torch-TensorRT Compilation
- :ref:`torch_export_3d_rope`: Compiling a 3D RoPE video-transformer block with complex numerics support