Skip to content

Commit 3502f57

Browse files
author
pytorchbot
committed
2024-05-14 nightly release (c517fef)
1 parent 46a9332 commit 3502f57

File tree

177 files changed

+42525
-20825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+42525
-20825
lines changed

.github/workflows/docgen.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
jobs:
1212
build-docs:
1313
runs-on: linux.g5.4xlarge.nvidia.gpu
14+
environment: pytorchbot-env
1415
container:
1516
image: docker.io/pytorch/manylinux-builder:cuda12.1
1617
options: --gpus all
@@ -22,6 +23,7 @@ jobs:
2223
- uses: actions/checkout@v3
2324
with:
2425
ref: ${{github.head_ref}}
26+
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
2527
- name: Select Python / CUDA
2628
run: |
2729
git config --global --add safe.directory /__w/TensorRT/TensorRT

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,8 @@ bazel-tensorrt
6969
bazel-project
7070
build/
7171
wheelhouse/
72+
*_status.json
73+
tests/py/dynamo/models/*.ts
74+
tests/py/dynamo/models/*.ep
75+
*.deb
76+
*.tar.xz

docs/_cpp_api/classtorch__tensorrt_1_1DataType.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/classtorch__tensorrt_1_1Device_1_1DeviceType.html

Lines changed: 194 additions & 155 deletions
Large diffs are not rendered by default.

docs/_cpp_api/classtorch__tensorrt_1_1TensorFormat.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/classtorch__tensorrt_1_1ptq_1_1Int8CacheCalibrator.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/classtorch__tensorrt_1_1ptq_1_1Int8Calibrator.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1a18d295a837ac71add5578860b55e5502.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1a282fd3c0b1c3a215148ae372070e1268.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1a31398a6d4d27e28817afb0f0139e909e.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1a35703561b26b1a9d2738ad7d58b27827.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1abd1465eb38256d3f22cc1426b23d516b.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1abe87b341f562fd1cf40b7672e4d759da.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1ad19939408f7be171a74a89928b36eb59.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/define_macros_8h_1adad592a7b1b7eed529cdf6acd584c883.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/dir_cpp.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/dir_cpp_include.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/dir_cpp_include_torch_tensorrt.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/enum_namespacetorch__tensorrt_1_1logging_1a130f65408ad8cbaee060f05e8db69558.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/enum_namespacetorch__tensorrt_1a3fbe5d72e4fc624dbd038853079620eb.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/file_cpp_include_torch_tensorrt_logging.h.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/file_cpp_include_torch_tensorrt_macros.h.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/file_cpp_include_torch_tensorrt_ptq.h.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/file_cpp_include_torch_tensorrt_torch_tensorrt.h.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1a0593f776f469c20469e2f729fc7861a3.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1a0c012cb374addd90eb1f42eaec570650.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1a56e110feaaba2c3fd44bd201fd21a76a.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1a7cb50492421ea9de4e3db895819df6f2.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1ac46ac0901cb97e3ae6e93b45f24e90b8.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1ad2efd47b6c3689e58ccc595680579ae5.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1logging_1af8f3443813315af7901903d25dd495cc.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1ptq_1a226e3c83379d1012cde8578c1c86b16c.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1ptq_1a6186e305f47c1d94b6130ef6c7f7e178.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1torchscript_1a5b405fd3bf3c8fc2e2a54cbbab979797.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1torchscript_1a6e19490a08fb1553c9dd347a5ae79db9.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1torchscript_1a81f9783517335dda877d8cfcf38987c9.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1_1torchscript_1ae8d56472106eeef37fbe51ff7f40c9b2.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1ac4ab8313ae72c2c899ea31548b528528.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1ad1acd06eaeaffbbcf6e7ebf426891384.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/function_namespacetorch__tensorrt_1ad6a4ee8ca6c8f6e5519eb1128ec7f4a1.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/namespace_torch_tensorrt.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/namespace_torch_tensorrt__logging.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/namespace_torch_tensorrt__ptq.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/namespace_torch_tensorrt__torchscript.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/program_listing_file_cpp_include_torch_tensorrt_logging.h.html

Lines changed: 191 additions & 152 deletions
Large diffs are not rendered by default.

docs/_cpp_api/program_listing_file_cpp_include_torch_tensorrt_macros.h.html

Lines changed: 192 additions & 153 deletions
Large diffs are not rendered by default.

docs/_cpp_api/program_listing_file_cpp_include_torch_tensorrt_ptq.h.html

Lines changed: 191 additions & 157 deletions
Large diffs are not rendered by default.

docs/_cpp_api/program_listing_file_cpp_include_torch_tensorrt_torch_tensorrt.h.html

Lines changed: 191 additions & 152 deletions
Large diffs are not rendered by default.

docs/_cpp_api/structtorch__tensorrt_1_1Device.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/structtorch__tensorrt_1_1GraphInputs.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/structtorch__tensorrt_1_1Input.html

Lines changed: 195 additions & 156 deletions
Large diffs are not rendered by default.

docs/_cpp_api/structtorch__tensorrt_1_1torchscript_1_1CompileSpec.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_cpp_api/torch_tensort_cpp.html

Lines changed: 199 additions & 160 deletions
Large diffs are not rendered by default.

docs/_cpp_api/unabridged_orphan.html

Lines changed: 193 additions & 154 deletions
Large diffs are not rendered by default.

docs/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def forward(self, x: torch.Tensor, y: torch.Tensor):
4343
# For the default settings, we can simply call torch.compile
4444
# with the backend "torch_tensorrt", and run the model on an
4545
# input to cause compilation, as so:
46-
optimized_model = torch.compile(model, backend="torch_tensorrt")
46+
optimized_model = torch.compile(model, backend="torch_tensorrt", dynamic=False)
4747
optimized_model(*sample_inputs)
4848

4949
# %%
@@ -81,7 +81,10 @@ def forward(self, x: torch.Tensor, y: torch.Tensor):
8181

8282
# Run the model on an input to cause compilation, as so:
8383
optimized_model_custom = torch.compile(
84-
model_half, backend="torch_tensorrt", options=backend_kwargs
84+
model_half,
85+
backend="torch_tensorrt",
86+
options=backend_kwargs,
87+
dynamic=False,
8588
)
8689
optimized_model_custom(*sample_inputs_half)
8790

docs/_downloads/46b3e6febaab06324aa2715896895544/torch_compile_stable_diffusion.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1919

2020
import torch
21-
from diffusers import DiffusionPipeline
22-
2321
import torch_tensorrt
22+
from diffusers import DiffusionPipeline
2423

2524
model_id = "CompVis/stable-diffusion-v1-4"
2625
device = "cuda:0"
@@ -39,7 +38,7 @@
3938
backend=backend,
4039
options={
4140
"truncate_long_and_double": True,
42-
"precision": torch.float16,
41+
"enabled_precisions": {torch.float32, torch.float16},
4342
},
4443
dynamic=False,
4544
)
Binary file not shown.
Binary file not shown.

docs/_downloads/79b11f38b95116a32190bdd045626574/custom_kernel_plugins.ipynb

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

docs/_downloads/b35883282793ac3413933fdb22d00d81/torch_compile_advanced_usage.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
"outputs": [],
6464
"source": [
65-
"# Next, we compile the model using torch.compile\n# For the default settings, we can simply call torch.compile\n# with the backend \"torch_tensorrt\", and run the model on an\n# input to cause compilation, as so:\noptimized_model = torch.compile(model, backend=\"torch_tensorrt\")\noptimized_model(*sample_inputs)"
65+
"# Next, we compile the model using torch.compile\n# For the default settings, we can simply call torch.compile\n# with the backend \"torch_tensorrt\", and run the model on an\n# input to cause compilation, as so:\noptimized_model = torch.compile(model, backend=\"torch_tensorrt\", dynamic=False)\noptimized_model(*sample_inputs)"
6666
]
6767
},
6868
{
@@ -91,7 +91,7 @@
9191
},
9292
"outputs": [],
9393
"source": [
94-
"# If we want to customize certain options in the backend,\n# but still use the torch.compile call directly, we can provide\n# custom options to the backend via the \"options\" keyword\n# which takes in a dictionary mapping options to values.\n#\n# For accepted backend options, see the CompilationSettings dataclass:\n# py/torch_tensorrt/dynamo/_settings.py\nbackend_kwargs = {\n \"enabled_precisions\": {torch.half},\n \"debug\": True,\n \"min_block_size\": 2,\n \"torch_executed_ops\": {\"torch.ops.aten.sub.Tensor\"},\n \"optimization_level\": 4,\n \"use_python_runtime\": False,\n}\n\n# Run the model on an input to cause compilation, as so:\noptimized_model_custom = torch.compile(\n model_half, backend=\"torch_tensorrt\", options=backend_kwargs\n)\noptimized_model_custom(*sample_inputs_half)"
94+
"# If we want to customize certain options in the backend,\n# but still use the torch.compile call directly, we can provide\n# custom options to the backend via the \"options\" keyword\n# which takes in a dictionary mapping options to values.\n#\n# For accepted backend options, see the CompilationSettings dataclass:\n# py/torch_tensorrt/dynamo/_settings.py\nbackend_kwargs = {\n \"enabled_precisions\": {torch.half},\n \"debug\": True,\n \"min_block_size\": 2,\n \"torch_executed_ops\": {\"torch.ops.aten.sub.Tensor\"},\n \"optimization_level\": 4,\n \"use_python_runtime\": False,\n}\n\n# Run the model on an input to cause compilation, as so:\noptimized_model_custom = torch.compile(\n model_half,\n backend=\"torch_tensorrt\",\n options=backend_kwargs,\n dynamic=False,\n)\noptimized_model_custom(*sample_inputs_half)"
9595
]
9696
},
9797
{

docs/_downloads/b776287bc876f7ce24942b82a66beb05/torch_compile_stable_diffusion.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"outputs": [],
2424
"source": [
25-
"import torch\nfrom diffusers import DiffusionPipeline\n\nimport torch_tensorrt\n\nmodel_id = \"CompVis/stable-diffusion-v1-4\"\ndevice = \"cuda:0\"\n\n# Instantiate Stable Diffusion Pipeline with FP16 weights\npipe = DiffusionPipeline.from_pretrained(\n model_id, revision=\"fp16\", torch_dtype=torch.float16\n)\npipe = pipe.to(device)\n\nbackend = \"torch_tensorrt\"\n\n# Optimize the UNet portion with Torch-TensorRT\npipe.unet = torch.compile(\n pipe.unet,\n backend=backend,\n options={\n \"truncate_long_and_double\": True,\n \"precision\": torch.float16,\n },\n dynamic=False,\n)"
25+
"import torch\nimport torch_tensorrt\nfrom diffusers import DiffusionPipeline\n\nmodel_id = \"CompVis/stable-diffusion-v1-4\"\ndevice = \"cuda:0\"\n\n# Instantiate Stable Diffusion Pipeline with FP16 weights\npipe = DiffusionPipeline.from_pretrained(\n model_id, revision=\"fp16\", torch_dtype=torch.float16\n)\npipe = pipe.to(device)\n\nbackend = \"torch_tensorrt\"\n\n# Optimize the UNet portion with Torch-TensorRT\npipe.unet = torch.compile(\n pipe.unet,\n backend=backend,\n options={\n \"truncate_long_and_double\": True,\n \"enabled_precisions\": {torch.float32, torch.float16},\n },\n dynamic=False,\n)"
2626
]
2727
},
2828
{

0 commit comments

Comments
 (0)