Draft
Conversation
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:05.736649+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:48.444837+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_advanced_usage:
Torch Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:05.736649+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:48.452240+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_resnet:
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
==========================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:05.737320+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:48.456049+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_resnet:
Compiling ResNet using the Torch-TensorRT `torch.compile` Backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:05.737320+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:48.502454+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_advanced_usage:
Dynamo Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:05.737320+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:48.505084+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:05.787851+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:48.507237+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_advanced_usage:
Torch Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:05.737320+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:48.513086+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:05.788321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:48.549736+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_resnet:
Compiling ResNet using the Torch-TensorRT `torch.compile` Backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:05.787851+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:48.547649+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_resnet:
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
==========================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:05.788321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:48.569154+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_advanced_usage:
Dynamo Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:05.788321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:48.571313+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:05.788321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:48.602875+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:05.836595+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:48.638288+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_advanced_usage:
Torch Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:05.836595+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:48.640555+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_resnet:
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
==========================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:05.837321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:48.700567+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:05.837321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:48.713612+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_resnet:
Compiling ResNet using the Torch-TensorRT `torch.compile` Backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:05.837321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:48.741264+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_advanced_usage:
Dynamo Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:05.888475+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py 2026-03-05 17:45:48.764060+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_advanced_usage:
Torch Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:05.837321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:48.768039+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py 2026-03-05 17:45:05.888475+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py 2026-03-05 17:45:48.802114+00:00
@@ -2,11 +2,12 @@
.. _torch_export_gpt2:
Compiling GPT2 using the Torch-TensorRT with dynamo backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a GPT2 model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a GPT2 model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
import torch
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/3d4d74f6636d986f33167154f6553961/torch_export_cudagraphs.py 2026-03-05 17:45:05.888475+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/3d4d74f6636d986f33167154f6553961/torch_export_cudagraphs.py 2026-03-05 17:45:48.813469+00:00
@@ -2,11 +2,12 @@
.. _torch_export_cudagraphs:
Torch Export with Cudagraphs
======================================================
-This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well."""
+This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:05.888475+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py 2026-03-05 17:45:48.833150+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_resnet:
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
==========================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/7b7004dc2ea6f839be532665e16e0426/torch_export_llama2.py 2026-03-05 17:45:05.889321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/7b7004dc2ea6f839be532665e16e0426/torch_export_llama2.py 2026-03-05 17:45:48.877782+00:00
@@ -2,11 +2,12 @@
.. _torch_export_llama2:
Compiling Llama2 using the Torch-TensorRT with dynamo backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a Llama2 model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with dynamo backend on a Llama2 model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
import torch
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:05.890321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py 2026-03-05 17:45:48.903853+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_resnet:
Compiling ResNet using the Torch-TensorRT `torch.compile` Backend
==========================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:05.890321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py 2026-03-05 17:45:48.929188+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model."""
+This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:05.890321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py 2026-03-05 17:45:48.931302+00:00
@@ -2,11 +2,12 @@
.. _dynamo_compile_advanced_usage:
Dynamo Compile Advanced Usage
======================================================
-This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
+This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:05.890321+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py 2026-03-05 17:45:48.957917+00:00
@@ -2,11 +2,12 @@
.. _torch_compile_transformer:
Compiling a Transformer using torch.compile and TensorRT
==============================================================
-This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
+This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
+"""
# %%
# Imports and Model Definition
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py 2026-03-05 17:45:06.294433+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py 2026-03-05 17:45:50.370560+00:00
@@ -49,15 +49,15 @@
if f'"version": "{version}"' in src:
print(f" {version} already present in generate_versions.py, skipping")
return
new_entry = (
- f' {{\n'
+ f" {{\n"
f' "name": "{version}",\n'
f' "version": "{version}",\n'
f' "url": "https://pytorch.org/TensorRT/{version}/",\n'
- f' }},\n'
+ f" }},\n"
)
new_ver = ver_tuple(version)
# Find the first existing vX.Y.Z entry whose version is strictly less than
@@ -70,11 +70,14 @@
if insert_pos is None:
# All existing entries are >= new version; append before closing bracket
insert_pos = src.rfind("]")
if insert_pos == -1:
- print("Error: could not find insertion point in generate_versions.py", file=sys.stderr)
+ print(
+ "Error: could not find insertion point in generate_versions.py",
+ file=sys.stderr,
+ )
sys.exit(1)
gen_versions.write_text(src[:insert_pos] + new_entry + src[insert_pos:])
print(f" Inserted {version} into generate_versions.py")
@@ -88,14 +91,17 @@
print(" Regenerated docs/versions.json")
def stage(repo_root: Path, version: str, docsrc: Path) -> None:
subprocess.run(
- ["git", "add",
- f"docs/{version}",
- "docs/versions.json",
- str(docsrc / "generate_versions.py")],
+ [
+ "git",
+ "add",
+ f"docs/{version}",
+ "docs/versions.json",
+ str(docsrc / "generate_versions.py"),
+ ],
cwd=repo_root,
check=True,
)
print(" Staged changes")
--- /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py 2026-03-05 17:45:06.376221+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py 2026-03-05 17:46:00.819482+00:00
@@ -138,13 +138,17 @@
with open(MANIFEST_FILE, "r") as f:
manifest = json.load(f)
if manifest["version"] == torch_version:
version_matches = True
else:
- print("Torch version: {} mismatches \
+ print(
+ "Torch version: {} mismatches \
with manifest's version: {}. Re-downloading \
- all models".format(torch_version, manifest["version"]))
+ all models".format(
+ torch_version, manifest["version"]
+ )
+ )
# Overwrite the manifest version as current torch version
manifest["version"] = torch_version
download_models(version_matches, manifest)There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py 2026-03-05 20:29:46.780559+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py 2026-03-05 20:30:27.594382+00:00
@@ -49,15 +49,15 @@
if f'"version": "{version}"' in src:
print(f" {version} already present in generate_versions.py, skipping")
return
new_entry = (
- f' {{\n'
+ f" {{\n"
f' "name": "{version}",\n'
f' "version": "{version}",\n'
f' "url": "https://pytorch.org/TensorRT/{version}/",\n'
- f' }},\n'
+ f" }},\n"
)
new_ver = ver_tuple(version)
# Find the first existing vX.Y.Z entry whose version is strictly less than
@@ -70,11 +70,14 @@
if insert_pos is None:
# All existing entries are >= new version; append before closing bracket
insert_pos = src.rfind("]")
if insert_pos == -1:
- print("Error: could not find insertion point in generate_versions.py", file=sys.stderr)
+ print(
+ "Error: could not find insertion point in generate_versions.py",
+ file=sys.stderr,
+ )
sys.exit(1)
gen_versions.write_text(src[:insert_pos] + new_entry + src[insert_pos:])
print(f" Inserted {version} into generate_versions.py")
@@ -88,14 +91,17 @@
print(" Regenerated docs/versions.json")
def stage(repo_root: Path, version: str, docsrc: Path) -> None:
subprocess.run(
- ["git", "add",
- f"docs/{version}",
- "docs/versions.json",
- str(docsrc / "generate_versions.py")],
+ [
+ "git",
+ "add",
+ f"docs/{version}",
+ "docs/versions.json",
+ str(docsrc / "generate_versions.py"),
+ ],
cwd=repo_root,
check=True,
)
print(" Staged changes")
--- /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py 2026-03-05 20:29:46.858344+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py 2026-03-05 20:30:37.946656+00:00
@@ -138,13 +138,17 @@
with open(MANIFEST_FILE, "r") as f:
manifest = json.load(f)
if manifest["version"] == torch_version:
version_matches = True
else:
- print("Torch version: {} mismatches \
+ print(
+ "Torch version: {} mismatches \
with manifest's version: {}. Re-downloading \
- all models".format(torch_version, manifest["version"]))
+ all models".format(
+ torch_version, manifest["version"]
+ )
+ )
# Overwrite the manifest version as current torch version
manifest["version"] = torch_version
download_models(version_matches, manifest)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: