-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Dheeraj Peri <[email protected]>
- Loading branch information
1 parent
edf63bb
commit f2e1e6c
Showing
9 changed files
with
75 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
.. _torch_tensorrt_tutorials: | ||
|
||
Torch-TensorRT Tutorials | ||
=========================== | ||
|
||
The user guide covers the basic concepts and usage of Torch-TensorRT. | ||
We also provide a number of tutorials to explore specific usecases and advanced concepts | ||
=========================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
.. _torch_compile: | ||
.. _torch_tensorrt_examples: | ||
|
||
Dynamo / ``torch.compile`` | ||
---------------------------- | ||
Here we provide examples of Torch-TensorRT compilation of popular computer vision and language models. | ||
|
||
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. | ||
Dependencies | ||
------------------------------------ | ||
|
||
Please install the following external dependencies (assuming you already have correct `torch`, `torch_tensorrt` and `tensorrt` libraries installed (`dependencies <https://github.com/pytorch/TensorRT?tab=readme-ov-file#dependencies>`_)) | ||
|
||
.. code-block:: python | ||
pip install -r requirements.txt | ||
Model Zoo | ||
------------------------------------ | ||
* :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_advanced_usage`: Advanced usage including making a custom backend to use directly with the ``torch.compile`` API | ||
* :ref:`torch_compile_stable_diffusion`: Compiling a Stable Diffusion model using ``torch.compile`` | ||
* :ref:`torch_export_cudagraphs`: Using the Cudagraphs integration with `ir="dynamo"` | ||
* :ref:`custom_kernel_plugins`: Creating a plugin to use a custom kernel inside TensorRT engines | ||
* :ref:`refit_engine_example`: Refitting a compiled TensorRT Graph Module with updated weights | ||
* :ref:`mutable_torchtrt_module_example`: Compile, use, and modify TensorRT Graph Module with MutableTorchTensorRTModule | ||
* :ref:`vgg16_fp8_ptq`: Compiling a VGG16 model with FP8 and PTQ using ``torch.compile`` | ||
* :ref:`engine_caching_example`: Utilizing engine caching to speed up compilation times | ||
* :ref:`engine_caching_bert_example`: Demonstrating engine caching on BERT | ||
* :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`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters