Skip to content

Changed test_refit_cumsum test#4121

Merged
lanluo-nvidia merged 1 commit into
mainfrom
cehongw/refit-test-patch
Mar 9, 2026
Merged

Changed test_refit_cumsum test#4121
lanluo-nvidia merged 1 commit into
mainfrom
cehongw/refit-test-patch

Conversation

@cehongwang
Copy link
Copy Markdown
Collaborator

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@cehongwang cehongwang requested a review from narendasan March 5, 2026 22:10
@meta-cla meta-cla Bot added the cla signed label Mar 5, 2026
@github-actions github-actions Bot added the component: tests Issues re: Tests label Mar 5, 2026
@github-actions github-actions Bot requested a review from lanluo-nvidia March 5, 2026 22:10
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 22:10:49.942442+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:30.514000+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 22:10:49.942442+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:30.518816+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 22:10:49.943388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:30.518164+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 22:10:49.943388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:30.568548+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 22:10:49.943388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:30.573477+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.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:49.943388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:30.576453+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:30.585924+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.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:30.616542+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/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:30.626629+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/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:30.639357+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/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:30.664951+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/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:10:49.992535+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:30.674329+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/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:10:50.039388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:30.682234+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:50.039388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:30.712399+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/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:10:50.040388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:30.769104+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 22:10:50.040388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:30.780412+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 22:10:50.040388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:30.792433+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.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:50.040388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:30.826115+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:50.091435+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:30.832798+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.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py	2026-03-05 22:10:50.091435+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py	2026-03-05 22:11:30.869872+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 22:10:50.091435+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/3d4d74f6636d986f33167154f6553961/torch_export_cudagraphs.py	2026-03-05 22:11:30.884307+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 22:10:50.091435+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:30.888344+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 22:10:50.092388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/7b7004dc2ea6f839be532665e16e0426/torch_export_llama2.py	2026-03-05 22:11:30.920354+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 22:10:50.093388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:30.972761+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 22:10:50.093388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:30.982710+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 22:10:50.093388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:30.986317+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 22:10:50.093388+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:31.029226+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 22:10:50.497127+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py	2026-03-05 22:11:32.423710+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 22:10:50.575468+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py	2026-03-05 22:11:42.792098+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)

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some changes that do not conform to Python style guidelines:

--- /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:10:51.701023+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:32.562990+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:51.701023+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:32.562315+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/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:10:51.701668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:32.571596+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 22:10:51.701668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:32.618469+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 22:10:51.701668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:32.621973+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.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:51.701668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.2.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:32.625468+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:51.751231+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:32.625735+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.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:10:51.751231+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:32.664980+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/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:10:51.751231+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:32.666168+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/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:10:51.751668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:32.685325+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 22:10:51.751231+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:32.688253+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 22:10:51.751668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.3.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:32.717309+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/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:10:51.799347+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:32.724647+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:51.799347+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:32.757507+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/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:10:51.799668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:32.819471+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 22:10:51.799668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:32.833832+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 22:10:51.799668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:32.848234+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.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:51.799668+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:32.874746+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/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:10:51.851002+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py	2026-03-05 22:11:32.888434+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.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py	2026-03-05 22:10:51.851002+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py	2026-03-05 22:11:32.921912+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 22:10:51.851002+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/3d4d74f6636d986f33167154f6553961/torch_export_cudagraphs.py	2026-03-05 22:11:32.929353+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 22:10:51.851002+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py	2026-03-05 22:11:32.938623+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 22:10:51.851669+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/7b7004dc2ea6f839be532665e16e0426/torch_export_llama2.py	2026-03-05 22:11:32.976910+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 22:10:51.852669+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py	2026-03-05 22:11:33.034482+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/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:10:51.852669+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py	2026-03-05 22:11:33.040534+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/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:10:51.852669+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py	2026-03-05 22:11:33.050230+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/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:10:51.852669+00:00
+++ /home/runner/work/TensorRT/TensorRT/docs/v2.5.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py	2026-03-05 22:11:33.094146+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 22:10:52.247641+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/add_version_docs.py	2026-03-05 22:11:34.521822+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 22:10:52.320807+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/perf/hub.py	2026-03-05 22:11:45.364876+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)

Copy link
Copy Markdown
Collaborator

@lanluo-nvidia lanluo-nvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lanluo-nvidia lanluo-nvidia merged commit 0c0f25c into main Mar 9, 2026
88 of 98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants