Skip to content

Commit 2c517be

Browse files
authored
chore: doc updates (#3238)
1 parent 1bb044f commit 2c517be

9 files changed

+37
-55
lines changed

Diff for: docsrc/index.rst

+14-11
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ User Guide
5454
tutorials/_rendered_examples/dynamo/vgg16_ptq
5555
tutorials/_rendered_examples/dynamo/engine_caching_example
5656
tutorials/_rendered_examples/dynamo/refit_engine_example
57+
tutorials/serving_torch_tensorrt_with_triton
58+
tutorials/_rendered_examples/dynamo/torch_export_cudagraphs
59+
tutorials/_rendered_examples/dynamo/converter_overloading
60+
tutorials/_rendered_examples/dynamo/custom_kernel_plugins
61+
tutorials/_rendered_examples/dynamo/mutable_torchtrt_module_example
5762

5863
Dynamo Frontend
5964
----------------
@@ -99,30 +104,28 @@ FX Frontend
99104

100105
fx/getting_started_with_fx_path
101106

102-
Tutorials
107+
Model Zoo
103108
------------
104-
* :ref:`torch_tensorrt_tutorials`
105-
* :ref:`serving_torch_tensorrt_with_triton`
109+
* :ref:`torch_compile_resnet`
110+
* :ref:`torch_compile_transformer`
111+
* :ref:`torch_compile_stable_diffusion`
112+
* :ref:`torch_export_gpt2`
113+
* :ref:`torch_export_llama2`
106114
* :ref:`notebooks`
107115

108116
.. toctree::
109-
:caption: Tutorials
117+
:caption: Model Zoo
110118
:maxdepth: 3
111119
:hidden:
112-
113-
tutorials/serving_torch_tensorrt_with_triton
114-
tutorials/notebooks
120+
115121
tutorials/_rendered_examples/dynamo/torch_compile_resnet_example
116122
tutorials/_rendered_examples/dynamo/torch_compile_transformers_example
117123
tutorials/_rendered_examples/dynamo/torch_compile_stable_diffusion
118-
tutorials/_rendered_examples/dynamo/torch_export_cudagraphs
119-
tutorials/_rendered_examples/dynamo/converter_overloading
120-
tutorials/_rendered_examples/dynamo/custom_kernel_plugins
121124
tutorials/_rendered_examples/distributed_inference/data_parallel_gpt2
122125
tutorials/_rendered_examples/distributed_inference/data_parallel_stable_diffusion
123-
tutorials/_rendered_examples/dynamo/mutable_torchtrt_module_example
124126
tutorials/_rendered_examples/dynamo/torch_export_gpt2
125127
tutorials/_rendered_examples/dynamo/torch_export_llama2
128+
tutorials/notebooks
126129

127130
Python API Documentation
128131
------------------------

Diff for: docsrc/tutorials/notebooks.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
.. _notebooks:
22

3-
Example notebooks
3+
Legacy notebooks
44
===================
55

6-
There exists a number of notebooks which cover specific using specific features and models
7-
with Torch-TensorRT
6+
There exists a number of notebooks which demonstrate different model conversions / features / frontends available within Torch-TensorRT
87

98
Notebooks
109
------------

Diff for: examples/README.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
.. _torch_tensorrt_tutorials:
22

33
Torch-TensorRT Tutorials
4-
===========================
5-
6-
The user guide covers the basic concepts and usage of Torch-TensorRT.
7-
We also provide a number of tutorials to explore specific usecases and advanced concepts
4+
===========================

Diff for: examples/dynamo/README.rst

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
.. _torch_compile:
1+
.. _torch_tensorrt_examples:
22

3-
Torch-TensorRT Examples
4-
====================================
5-
6-
Please refer to the following examples which demonstrate the usage of different features of Torch-TensorRT. We also provide
7-
examples of Torch-TensorRT compilation of select computer vision and language models.
3+
Here we provide examples of Torch-TensorRT compilation of popular computer vision and language models.
84

95
Dependencies
106
------------------------------------
@@ -16,18 +12,6 @@ Please install the following external dependencies (assuming you already have co
1612
pip install -r requirements.txt
1713
1814
19-
Compiler Features
20-
------------------------------------
21-
* :ref:`torch_compile_advanced_usage`: Advanced usage including making a custom backend to use directly with the ``torch.compile`` API
22-
* :ref:`torch_export_cudagraphs`: Using the Cudagraphs integration with `ir="dynamo"`
23-
* :ref:`converter_overloading`: How to write custom converters and overload existing ones
24-
* :ref:`custom_kernel_plugins`: Creating a plugin to use a custom kernel inside TensorRT engines
25-
* :ref:`refit_engine_example`: Refitting a compiled TensorRT Graph Module with updated weights
26-
* :ref:`mutable_torchtrt_module_example`: Compile, use, and modify TensorRT Graph Module with MutableTorchTensorRTModule
27-
* :ref:`vgg16_fp8_ptq`: Compiling a VGG16 model with FP8 and PTQ using ``torch.compile``
28-
* :ref:`engine_caching_example`: Utilizing engine caching to speed up compilation times
29-
* :ref:`engine_caching_bert_example`: Demonstrating engine caching on BERT
30-
3115
Model Zoo
3216
------------------------------------
3317
* :ref:`torch_compile_resnet`: Compiling a ResNet model using the Torch Compile Frontend for ``torch_tensorrt.compile``

Diff for: examples/dynamo/torch_compile_resnet_example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
.. _torch_compile_resnet:
33
4-
Compiling ResNet using the Torch-TensorRT `torch.compile` Backend
4+
Compiling ResNet with dynamic shapes using the `torch.compile` backend
55
==========================================================
66
77
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""

Diff for: examples/dynamo/torch_compile_stable_diffusion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
.. _torch_compile_stable_diffusion:
33
4-
Torch Compile Stable Diffusion
4+
Compiling Stable Diffusion model using the `torch.compile` backend
55
======================================================
66
77
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a Stable Diffusion model. A sample output is featured below:

Diff for: examples/dynamo/torch_compile_transformers_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
22
.. _torch_compile_transformer:
33
4-
Compiling a Transformer using torch.compile and TensorRT
4+
Compiling BERT using the `torch.compile` backend
55
==============================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model."""
7+
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a BERT model."""
88

99
# %%
1010
# Imports and Model Definition

Diff for: examples/dynamo/torch_export_gpt2.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
22
.. _torch_export_gpt2:
33
4-
Compiling GPT2 using the Torch-TensorRT with dynamo backend
4+
Compiling GPT2 using the dynamo backend
55
==========================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a GPT2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular GPT2 model."""
88

99
# %%
1010
# Imports and Model Definition
@@ -88,13 +88,10 @@
8888
tokenizer.decode(trt_gen_tokens[0], skip_special_tokens=True),
8989
)
9090

91-
# %%
92-
# The output sentences should look like
93-
# =============================
94-
# Pytorch model generated text: What is parallel programming ?
91+
# Prompt : What is parallel programming ?
9592

96-
# The parallel programming paradigm is a set of programming languages that are designed to be used in parallel. The main difference between parallel programming and parallel programming is that
9793
# =============================
98-
# TensorRT model generated text: What is parallel programming ?
94+
# Pytorch model generated text: The parallel programming paradigm is a set of programming languages that are designed to be used in parallel. The main difference between parallel programming and parallel programming is that
9995

100-
# The parallel programming paradigm is a set of programming languages that are designed to be used in parallel. The main difference between parallel programming and parallel programming is that
96+
# =============================
97+
# TensorRT model generated text: The parallel programming paradigm is a set of programming languages that are designed to be used in parallel. The main difference between parallel programming and parallel programming is that

Diff for: examples/dynamo/torch_export_llama2.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
22
.. _torch_export_llama2:
33
4-
Compiling Llama2 using the Torch-TensorRT with dynamo backend
4+
Compiling Llama2 using the dynamo backend
55
==========================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a Llama2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular Llama2 model."""
88

99
# %%
1010
# Imports and Model Definition
@@ -91,9 +91,11 @@
9191
)[0],
9292
)
9393

94-
# %%
95-
# The output sentences should look like
94+
95+
# Prompt : What is dynamic programming?
96+
9697
# =============================
97-
# Pytorch model generated text: Dynamic programming is an algorithmic technique used to solve complex problems by breaking them down into smaller subproblems, solving each subproblem only once, and
98+
# Pytorch model generated text: Dynamic programming is an algorithmic technique used to solve complex problems by breaking them down into smaller subproblems, solving each subproblem only once, and
99+
98100
# =============================
99-
# TensorRT model generated text: Dynamic programming is an algorithmic technique used to solve complex problems by breaking them down into smaller subproblems, solving each subproblem only once, and
101+
# TensorRT model generated text: Dynamic programming is an algorithmic technique used to solve complex problems by breaking them down into smaller subproblems, solving each subproblem only once, and

0 commit comments

Comments
 (0)