docs: Update the docs to the new theme from PyTorch#4110
Open
narendasan wants to merge 2 commits intomainfrom
Open
docs: Update the docs to the new theme from PyTorch#4110narendasan wants to merge 2 commits intomainfrom
narendasan wants to merge 2 commits intomainfrom
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/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)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/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)dae18db to
4971aae
Compare
There was a problem hiding this comment.
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(d236f70 to
6036a31
Compare
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
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.
Checklist: