Skip to content

docs: Update the docs to the new theme from PyTorch#4110

Open
narendasan wants to merge 2 commits intomainfrom
narendasan/push-yyuupsxuuqzz
Open

docs: Update the docs to the new theme from PyTorch#4110
narendasan wants to merge 2 commits intomainfrom
narendasan/push-yyuupsxuuqzz

Conversation

@narendasan
Copy link
Collaborator

Description

Upgrades the docs to use the new PyTorch sphinx theme, does some basic reorganization

There is now a justfile you can use to build the docs, will add more stuff to this over time

Fixes

Type of change

Please delete options that are not relevant and/or add your own.

  • 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

@narendasan narendasan requested a review from lanluo-nvidia March 3, 2026 22:18
@meta-cla meta-cla bot added the cla signed label Mar 3, 2026
@github-actions github-actions bot added documentation Improvements or additions to documentation component: build system Issues re: Build system labels Mar 3, 2026
Copy link

@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/docsrc/generate_versions.py	2026-03-03 22:19:11.090541+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/generate_versions.py	2026-03-03 22:19:45.616005+00:00
@@ -12,27 +12,95 @@
        "name": "main (latest)",
        "version": "main",
        "url": "https://pytorch.org/TensorRT/",
        "preferred": True,
    },
-    {"name": "v2.3.0", "version": "v2.3.0", "url": "https://pytorch.org/TensorRT/v2.3.0/"},
-    {"name": "v2.2.0", "version": "v2.2.0", "url": "https://pytorch.org/TensorRT/v2.2.0/"},
-    {"name": "v2.1.0", "version": "v2.1.0", "url": "https://pytorch.org/TensorRT/v2.1.0/"},
-    {"name": "v1.4.0", "version": "v1.4.0", "url": "https://pytorch.org/TensorRT/v1.4.0/"},
-    {"name": "v1.3.0", "version": "v1.3.0", "url": "https://pytorch.org/TensorRT/v1.3.0/"},
-    {"name": "v1.2.0", "version": "v1.2.0", "url": "https://pytorch.org/TensorRT/v1.2.0/"},
-    {"name": "v1.1.1", "version": "v1.1.1", "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.1/"},
-    {"name": "v1.1.0", "version": "v1.1.0", "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.0/"},
-    {"name": "v1.0.0", "version": "v1.0.0", "url": "https://nvidia.github.io/Torch-TensorRT/v1.0.0/"},
-    {"name": "v0.4.1", "version": "v0.4.1", "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.1/"},
-    {"name": "v0.4.0", "version": "v0.4.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.0/"},
-    {"name": "v0.3.0", "version": "v0.3.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.3.0/"},
-    {"name": "v0.2.0", "version": "v0.2.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.2.0/"},
-    {"name": "v0.1.0", "version": "v0.1.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.1.0/"},
-    {"name": "v0.0.3", "version": "v0.0.3", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.3/"},
-    {"name": "v0.0.2", "version": "v0.0.2", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.2/"},
-    {"name": "v0.0.1", "version": "v0.0.1", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.1/"},
+    {
+        "name": "v2.3.0",
+        "version": "v2.3.0",
+        "url": "https://pytorch.org/TensorRT/v2.3.0/",
+    },
+    {
+        "name": "v2.2.0",
+        "version": "v2.2.0",
+        "url": "https://pytorch.org/TensorRT/v2.2.0/",
+    },
+    {
+        "name": "v2.1.0",
+        "version": "v2.1.0",
+        "url": "https://pytorch.org/TensorRT/v2.1.0/",
+    },
+    {
+        "name": "v1.4.0",
+        "version": "v1.4.0",
+        "url": "https://pytorch.org/TensorRT/v1.4.0/",
+    },
+    {
+        "name": "v1.3.0",
+        "version": "v1.3.0",
+        "url": "https://pytorch.org/TensorRT/v1.3.0/",
+    },
+    {
+        "name": "v1.2.0",
+        "version": "v1.2.0",
+        "url": "https://pytorch.org/TensorRT/v1.2.0/",
+    },
+    {
+        "name": "v1.1.1",
+        "version": "v1.1.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.1/",
+    },
+    {
+        "name": "v1.1.0",
+        "version": "v1.1.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.0/",
+    },
+    {
+        "name": "v1.0.0",
+        "version": "v1.0.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.0.0/",
+    },
+    {
+        "name": "v0.4.1",
+        "version": "v0.4.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.1/",
+    },
+    {
+        "name": "v0.4.0",
+        "version": "v0.4.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.0/",
+    },
+    {
+        "name": "v0.3.0",
+        "version": "v0.3.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.3.0/",
+    },
+    {
+        "name": "v0.2.0",
+        "version": "v0.2.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.2.0/",
+    },
+    {
+        "name": "v0.1.0",
+        "version": "v0.1.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.1.0/",
+    },
+    {
+        "name": "v0.0.3",
+        "version": "v0.0.3",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.3/",
+    },
+    {
+        "name": "v0.0.2",
+        "version": "v0.0.2",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.2/",
+    },
+    {
+        "name": "v0.0.1",
+        "version": "v0.0.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.1/",
+    },
]

if __name__ == "__main__":
    out = sys.argv[1] if len(sys.argv) > 1 else None
    payload = json.dumps(VERSIONS, indent=2)

Copy link

@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/docsrc/generate_versions.py	2026-03-03 22:19:11.426975+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/generate_versions.py	2026-03-03 22:19:48.839081+00:00
@@ -12,27 +12,95 @@
        "name": "main (latest)",
        "version": "main",
        "url": "https://pytorch.org/TensorRT/",
        "preferred": True,
    },
-    {"name": "v2.3.0", "version": "v2.3.0", "url": "https://pytorch.org/TensorRT/v2.3.0/"},
-    {"name": "v2.2.0", "version": "v2.2.0", "url": "https://pytorch.org/TensorRT/v2.2.0/"},
-    {"name": "v2.1.0", "version": "v2.1.0", "url": "https://pytorch.org/TensorRT/v2.1.0/"},
-    {"name": "v1.4.0", "version": "v1.4.0", "url": "https://pytorch.org/TensorRT/v1.4.0/"},
-    {"name": "v1.3.0", "version": "v1.3.0", "url": "https://pytorch.org/TensorRT/v1.3.0/"},
-    {"name": "v1.2.0", "version": "v1.2.0", "url": "https://pytorch.org/TensorRT/v1.2.0/"},
-    {"name": "v1.1.1", "version": "v1.1.1", "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.1/"},
-    {"name": "v1.1.0", "version": "v1.1.0", "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.0/"},
-    {"name": "v1.0.0", "version": "v1.0.0", "url": "https://nvidia.github.io/Torch-TensorRT/v1.0.0/"},
-    {"name": "v0.4.1", "version": "v0.4.1", "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.1/"},
-    {"name": "v0.4.0", "version": "v0.4.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.0/"},
-    {"name": "v0.3.0", "version": "v0.3.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.3.0/"},
-    {"name": "v0.2.0", "version": "v0.2.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.2.0/"},
-    {"name": "v0.1.0", "version": "v0.1.0", "url": "https://nvidia.github.io/Torch-TensorRT/v0.1.0/"},
-    {"name": "v0.0.3", "version": "v0.0.3", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.3/"},
-    {"name": "v0.0.2", "version": "v0.0.2", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.2/"},
-    {"name": "v0.0.1", "version": "v0.0.1", "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.1/"},
+    {
+        "name": "v2.3.0",
+        "version": "v2.3.0",
+        "url": "https://pytorch.org/TensorRT/v2.3.0/",
+    },
+    {
+        "name": "v2.2.0",
+        "version": "v2.2.0",
+        "url": "https://pytorch.org/TensorRT/v2.2.0/",
+    },
+    {
+        "name": "v2.1.0",
+        "version": "v2.1.0",
+        "url": "https://pytorch.org/TensorRT/v2.1.0/",
+    },
+    {
+        "name": "v1.4.0",
+        "version": "v1.4.0",
+        "url": "https://pytorch.org/TensorRT/v1.4.0/",
+    },
+    {
+        "name": "v1.3.0",
+        "version": "v1.3.0",
+        "url": "https://pytorch.org/TensorRT/v1.3.0/",
+    },
+    {
+        "name": "v1.2.0",
+        "version": "v1.2.0",
+        "url": "https://pytorch.org/TensorRT/v1.2.0/",
+    },
+    {
+        "name": "v1.1.1",
+        "version": "v1.1.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.1/",
+    },
+    {
+        "name": "v1.1.0",
+        "version": "v1.1.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.1.0/",
+    },
+    {
+        "name": "v1.0.0",
+        "version": "v1.0.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v1.0.0/",
+    },
+    {
+        "name": "v0.4.1",
+        "version": "v0.4.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.1/",
+    },
+    {
+        "name": "v0.4.0",
+        "version": "v0.4.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.4.0/",
+    },
+    {
+        "name": "v0.3.0",
+        "version": "v0.3.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.3.0/",
+    },
+    {
+        "name": "v0.2.0",
+        "version": "v0.2.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.2.0/",
+    },
+    {
+        "name": "v0.1.0",
+        "version": "v0.1.0",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.1.0/",
+    },
+    {
+        "name": "v0.0.3",
+        "version": "v0.0.3",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.3/",
+    },
+    {
+        "name": "v0.0.2",
+        "version": "v0.0.2",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.2/",
+    },
+    {
+        "name": "v0.0.1",
+        "version": "v0.0.1",
+        "url": "https://nvidia.github.io/Torch-TensorRT/v0.0.1/",
+    },
]

if __name__ == "__main__":
    out = sys.argv[1] if len(sys.argv) > 1 else None
    payload = json.dumps(VERSIONS, indent=2)

@narendasan narendasan force-pushed the narendasan/push-yyuupsxuuqzz branch from dae18db to 4971aae Compare March 3, 2026 23:13
Copy link

@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/examples/dynamo/aot_plugin.py	2026-03-04 06:41:12.280043+00:00
+++ /home/runner/work/TensorRT/TensorRT/examples/dynamo/aot_plugin.py	2026-03-04 06:41:46.027090+00:00
@@ -160,23 +160,23 @@
    # Build symbolic launch parameters.
    # ``X.shape_expr.numel()`` is a symbolic expression for the total number of
    # elements — TRT will evaluate it to a concrete integer at engine runtime.
    N = X.shape_expr.numel()
    launch_params = trtp.KernelLaunchParams()
-    launch_params.grid_x = trtp.cdiv(N, block_size)          # number of thread blocks
+    launch_params.grid_x = trtp.cdiv(N, block_size)  # number of thread blocks
    launch_params.block_x = compiled_kernel.metadata.num_warps * 32  # threads per block
-    launch_params.shared_mem = compiled_kernel.metadata.shared       # bytes of shared mem
+    launch_params.shared_mem = compiled_kernel.metadata.shared  # bytes of shared mem

    # ``extra_args`` are scalar arguments appended to the kernel's argument list at
    # launch. Here ``n_elements`` is passed as a 32-bit symbolic integer so TRT
    # evaluates it from the actual tensor size at runtime.
    extra_args = trtp.SymIntExprs(1)
    extra_args[0] = trtp.SymInt32(N)

    return (
-        compiled_kernel.metadata.name,   # kernel function name in PTX
-        compiled_kernel.asm["ptx"],      # PTX source — embedded in TRT engine
+        compiled_kernel.metadata.name,  # kernel function name in PTX
+        compiled_kernel.asm["ptx"],  # PTX source — embedded in TRT engine
        launch_params,
        extra_args,
    )


--- /home/runner/work/TensorRT/TensorRT/tools/gen_dynamo_supported_ops.py	2026-03-04 06:41:12.331682+00:00
+++ /home/runner/work/TensorRT/TensorRT/tools/gen_dynamo_supported_ops.py	2026-03-04 06:41:55.638014+00:00
@@ -29,12 +29,12 @@
    prefix = key.split(".")[0]  # "aten", "prims", "_operator"
    if prefix == "_operator":
        return key  # no schema available, just show the qualified name
    if prefix == "prims":
        # schema = "prims.(args) -> ret" — insert the op name after the dot
-        op_name = key[len("prims."):]  # e.g. "sum"
-        return f"prims.{op_name}" + schema[len("prims."):]
+        op_name = key[len("prims.") :]  # e.g. "sum"
+        return f"prims.{op_name}" + schema[len("prims.") :]
    return schema  # aten schemas are already complete


def ops_by_status(data, status):
    entries = []
@@ -121,17 +121,13 @@

    out_path = Path(out_path)
    out_path.parent.mkdir(parents=True, exist_ok=True)
    out_path.write_text("\n".join(lines) + "\n")
    print(f"Written to {out_path}")
-    print(
-        f"  ATen converted: {len(aten_converted)}, lowered: {len(aten_lowered)}"
-    )
+    print(f"  ATen converted: {len(aten_converted)}, lowered: {len(aten_lowered)}")
    print(f"  Python builtins converted: {len(py_converted)}")
-    print(
-        f"  Prims converted: {len(prims_converted)}, lowered: {len(prims_lowered)}"
-    )
+    print(f"  Prims converted: {len(prims_converted)}, lowered: {len(prims_lowered)}")


if __name__ == "__main__":
    repo_root = Path(__file__).parent.parent
    generate(

@narendasan narendasan force-pushed the narendasan/push-yyuupsxuuqzz branch from d236f70 to 6036a31 Compare March 4, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: build system Issues re: Build system documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant