:orphan: .. _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 .. raw:: html
.. raw:: html
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. * :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 .. raw:: html
.. raw:: html
.. only:: html .. image:: /tutorials/_rendered_examples/dynamo/images/thumb/sphx_glr_torch_compile_resnet_example_thumb.png :alt: :ref:`sphx_glr_tutorials__rendered_examples_dynamo_torch_compile_resnet_example.py` .. raw:: html
Compiling ResNet using the Torch-TensorRT torch.compile Backend
.. raw:: html
.. only:: html .. image:: /tutorials/_rendered_examples/dynamo/images/thumb/sphx_glr_torch_compile_transformers_example_thumb.png :alt: :ref:`sphx_glr_tutorials__rendered_examples_dynamo_torch_compile_transformers_example.py` .. raw:: html
Compiling a Transformer using torch.compile and TensorRT
.. raw:: html
.. only:: html .. image:: /tutorials/_rendered_examples/dynamo/images/thumb/sphx_glr_torch_compile_advanced_usage_thumb.png :alt: :ref:`sphx_glr_tutorials__rendered_examples_dynamo_torch_compile_advanced_usage.py` .. raw:: html
Torch Compile Advanced Usage
.. raw:: html
.. toctree:: :hidden: :includehidden: /tutorials/_rendered_examples//dynamo/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: _rendered_examples_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: _rendered_examples_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_