-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorg docs and fix css for sphix-gallery examples #1967
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* sphinx-design styles for cards/tabs | ||
*/ | ||
|
||
.sphx-glr-thumbcontainer { | ||
padding: 50%; | ||
display: flex; | ||
align-content: center; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
body { | ||
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; | ||
} | ||
|
||
/* Default header fonts are ugly */ | ||
h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend, p.caption { | ||
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; | ||
} | ||
|
||
/* Use white for docs background */ | ||
.wy-side-nav-search { | ||
background-color: #fff; | ||
} | ||
|
||
.wy-nav-content-wrap, .wy-menu li.current > a { | ||
background-color: #fff; | ||
} | ||
|
||
@media screen and (min-width: 1400px) { | ||
.wy-nav-content-wrap { | ||
background-color: rgba(0, 0, 0, 0.0470588); | ||
} | ||
|
||
.wy-nav-content { | ||
background-color: #fff; | ||
} | ||
} | ||
|
||
/* Fixes for mobile */ | ||
.wy-nav-top { | ||
background-color: #fff; | ||
background-image: url('../img/pytorch-logo-dark.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
padding: 0; | ||
margin: 0.4045em 0.809em; | ||
color: #333; | ||
} | ||
|
||
.wy-nav-top > a { | ||
display: none; | ||
} | ||
|
||
@media screen and (max-width: 768px) { | ||
.wy-side-nav-search>a img.logo { | ||
height: 60px; | ||
} | ||
} | ||
|
||
/* This is needed to ensure that logo above search scales properly */ | ||
.wy-side-nav-search a { | ||
display: block; | ||
} | ||
|
||
/* This ensures that multiple constructors will remain in separate lines. */ | ||
.rst-content dl:not(.docutils) dt { | ||
display: table; | ||
} | ||
|
||
/* Use our red for literals (it's very similar to the original color) */ | ||
.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal { | ||
color: #F05732; | ||
} | ||
|
||
.rst-content tt.xref, a .rst-content tt, .rst-content tt.xref, | ||
.rst-content code.xref, a .rst-content tt, a .rst-content code { | ||
color: #404040; | ||
} | ||
|
||
/* Change link colors (except for the menu) */ | ||
|
||
a { | ||
color: #F05732; | ||
} | ||
|
||
a:hover { | ||
color: #F05732; | ||
} | ||
|
||
|
||
a:visited { | ||
color: #D44D2C; | ||
} | ||
|
||
.wy-menu a { | ||
color: #b3b3b3; | ||
} | ||
|
||
.wy-menu a:hover { | ||
color: #b3b3b3; | ||
} | ||
|
||
a.icon.icon-home { | ||
color: #D44D2C; | ||
} | ||
|
||
.version{ | ||
color: #D44D2C !important; | ||
} | ||
|
||
/* Default footer text is quite big */ | ||
footer { | ||
font-size: 80%; | ||
} | ||
|
||
footer .rst-footer-buttons { | ||
font-size: 125%; /* revert footer settings - 1/80% = 125% */ | ||
} | ||
|
||
footer p { | ||
font-size: 100%; | ||
} | ||
|
||
/* For hidden headers that appear in TOC tree */ | ||
/* see https://stackoverflow.com/a/32363545/3343043 */ | ||
.rst-content .hidden-section { | ||
display: none; | ||
} | ||
|
||
nav .hidden-section { | ||
display: inherit; | ||
} | ||
|
||
/* Make code blocks have a background */ | ||
.codeblock,pre.literal-block,.rst-content .literal-block,.rst-content pre.literal-block,div[class^='highlight'] { | ||
background: rgba(0, 0, 0, 0.0470588); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. _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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
.. _dynamo_compile: | ||
|
||
Dynamo Compile Examples | ||
================ | ||
Dynamo / ``torch.compile`` | ||
---------------------------- | ||
|
||
This document contains examples of usage of the `torch_tensorrt.dynamo.compile` API which integrates with `torch.compile` functionality | ||
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. | ||
|
||
Overview of Available Scripts | ||
----------------------------------------------- | ||
- `dynamo_compile_resnet_example.py <./dynamo_compile_resnet_example.html>`_: Example showcasing compilation of ResNet model | ||
- `dynamo_compile_transformers_example.py <./dynamo_compile_transformers_example.html>`_: Example showcasing compilation of transformer-based model | ||
- `dynamo_compile_advanced_usage.py <./dynamo_compile_advanced_usage.html>`_: Advanced usage including making a custom backend to use directly with the `torch.compile` API | ||
* :ref:`dynamo_compile_resnet`: Compiling a ResNet model using the Dynamo Compile Frontend for ``torch_tensorrt.compile`` | ||
* :ref:`torch_compile_transformer`: Compiling a Transformer model using ``torch.compile`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the transformers script is nearly the same as the Resnet script, except for the model, this could instead be:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Id like for the Transformer script to use the torch.compile interface |
||
* :ref:`dynamo_compile_advanced_usage`: Advanced usage including making a custom backend to use directly with the ``torch.compile`` API |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
""" | ||
Dynamo Compile ResNet Example | ||
========================= | ||
.. _dynamo_compile_resnet: | ||
|
||
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
========================================================== | ||
|
||
This interactive script is intended as a sample of the `torch_tensorrt.compile` workflow with `torch.compile` on a ResNet model.""" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
""" | ||
Dynamo Compile Transformers Example | ||
========================= | ||
.. _torch_compile_transformer: | ||
|
||
Compiling a Transformer using torch.compile and TensorRT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
============================================================== | ||
|
||
This interactive script is intended as a sample of the `torch_tensorrt.compile` workflow with `torch.compile` on a transformer-based model.""" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs rename,
Dynamo Compile
now means something else in thetorch_tensorrt
context