Skip to content

[None][doc] Add docs for AutoDeploy transforms - #15122

Merged
bmarimuthu-nv merged 3 commits into
NVIDIA:mainfrom
nv-auto-deploy:bala/auto-transform-docs1
Jun 9, 2026
Merged

[None][doc] Add docs for AutoDeploy transforms#15122
bmarimuthu-nv merged 3 commits into
NVIDIA:mainfrom
nv-auto-deploy:bala/auto-transform-docs1

Conversation

@bmarimuthu-nv

@bmarimuthu-nv bmarimuthu-nv commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Documentation
    • Added comprehensive AutoDeploy transforms documentation including descriptions of all pipeline stages (factory, export, post-export, pattern matching, sharding, weight loading, post-load fusion, cache initialization, visualization, and compilation) with auto-generated API references.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

Signed-off-by: Balamurugan Marimuthu <246387390+bmarimuthu-nv@users.noreply.github.com>
Signed-off-by: Balamurugan Marimuthu <246387390+bmarimuthu-nv@users.noreply.github.com>
Signed-off-by: Balamurugan Marimuthu <246387390+bmarimuthu-nv@users.noreply.github.com>
@bmarimuthu-nv

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit summary

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Summary regeneration triggered.

@bmarimuthu-nv bmarimuthu-nv changed the title [None][docs] Add docs for AutoDeploy transform [None][doc] Add docs for AutoDeploy transforms Jun 8, 2026
@bmarimuthu-nv

Copy link
Copy Markdown
Collaborator Author

@bmarimuthu-nv
bmarimuthu-nv marked this pull request as ready for review June 8, 2026 22:59
@bmarimuthu-nv
bmarimuthu-nv requested review from a team as code owners June 8, 2026 22:59
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a Sphinx extension that discovers AutoDeploy transforms from source and YAML configs and generates transform-stage documentation; integrates the extension into Sphinx and adds a landing page plus per-stage RST pages that invoke the new directives.

Changes

AutoDeploy Transform Documentation with Sphinx Extension

Layer / File(s) Summary
Sphinx Extension for AutoDeploy Transforms
docs/source/_ext/trtllm_auto_deploy.py
Implements a 470-line Sphinx extension that discovers transform modules by filesystem scanning (without imports), parses Python source with AST to extract TransformRegistry.register() decorators and get_config_class uses, resolves config-class inheritance with cycle detection, loads and validates YAML stage/mode mappings from checked-in AutoDeploy configs, and registers two directives: trtllm_auto_deploy_transform_stage and trtllm_auto_deploy_additional_transforms to render stage-specific and unassigned transforms.
Documentation Infrastructure Setup
docs/source/conf.py, .gitignore
Registers the trtllm_auto_deploy extension in Sphinx configuration and updates .gitignore to un-ignore transforms.rst while ignoring the transforms/ directory and its *.rst files.
Transform Stage Documentation Pages
docs/source/features/auto_deploy/transforms.rst, .../transforms/core.rst, .../transforms/export.rst, .../transforms/factory.rst, .../transforms/pattern_matcher.rst, .../transforms/post_export.rst, .../transforms/sharding.rst, .../transforms/compile.rst, .../transforms/cache_init.rst, .../transforms/weight_load.rst, .../transforms/post_load_fusion.rst, .../transforms/visualize.rst, .../transforms/additional.rst
Adds a landing page and per-stage RST pages that invoke the new directives to render discovered transform classes and their resolved config models, and documents core transform APIs via autopydantic_model/automodule directives.
Documentation Navigation Integration
docs/source/features/auto_deploy/auto-deploy.md, docs/source/index.rst
Adds an "API Reference" link to AutoDeploy Transforms in the AutoDeploy beta docs and inserts features/auto_deploy/transforms.rst into the main documentation toctree.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It only contains the repository template with no substantive content in required sections like Description, Test Coverage, or implementation details. Fill in the Description section explaining what documentation was added and why. Add Test Coverage section documenting build verification steps. Complete the PR checklist comments to explain design decisions and dependency checks.
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title '[None][doc] Add docs for AutoDeploy transforms' is directly related to the main change—comprehensive documentation addition for AutoDeploy transforms.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@govind-ramnarayan govind-ramnarayan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, docs look clean. I guess one question is how we will keep this updated - if we add a new transform, will we get a KeyError or something in this trtllm_auto_deploy script? Does it depend on whether it is in an existing stage or in a new stage?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/_ext/trtllm_auto_deploy.py`:
- Around line 1-2: Replace the current two-line SPDX-only header at the top of
docs/source/_ext/trtllm_auto_deploy.py with the repository's full NVIDIA
copyright/license header block required for Python files (i.e., the standard
multi-line NVIDIA copyright header that includes the company copyright line,
years, and the SPDX-License-Identifier), ensuring the header appears before any
imports or code in the trtllm_auto_deploy module.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 852038e4-5964-44eb-a18b-90b650271ab2

📥 Commits

Reviewing files that changed from the base of the PR and between 9827c21 and f56aaa0.

📒 Files selected for processing (18)
  • .gitignore
  • docs/source/_ext/trtllm_auto_deploy.py
  • docs/source/conf.py
  • docs/source/features/auto_deploy/auto-deploy.md
  • docs/source/features/auto_deploy/transforms.rst
  • docs/source/features/auto_deploy/transforms/additional.rst
  • docs/source/features/auto_deploy/transforms/cache_init.rst
  • docs/source/features/auto_deploy/transforms/compile.rst
  • docs/source/features/auto_deploy/transforms/core.rst
  • docs/source/features/auto_deploy/transforms/export.rst
  • docs/source/features/auto_deploy/transforms/factory.rst
  • docs/source/features/auto_deploy/transforms/pattern_matcher.rst
  • docs/source/features/auto_deploy/transforms/post_export.rst
  • docs/source/features/auto_deploy/transforms/post_load_fusion.rst
  • docs/source/features/auto_deploy/transforms/sharding.rst
  • docs/source/features/auto_deploy/transforms/visualize.rst
  • docs/source/features/auto_deploy/transforms/weight_load.rst
  • docs/source/index.rst

Comment thread docs/source/_ext/trtllm_auto_deploy.py
@bmarimuthu-nv

Copy link
Copy Markdown
Collaborator Author

LGTM, docs look clean. I guess one question is how we will keep this updated - if we add a new transform, will we get a KeyError or something in this trtllm_auto_deploy script? Does it depend on whether it is in an existing stage or in a new stage?

For a new transform in an existing configured stage the doc generation is automatic. But a new stage needs a docs page/toctree entry for it to show up as a stage page.

@tburt-nv

tburt-nv commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

/bot run --stages "A10-Build_Docs"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52885 Bot args parsing error: usage: /bot [-h]
{run,kill,skip,submit,reviewers,reuse-pipeline,reuse-review} ...
/bot: error: unrecognized arguments: --stages A10-Build_Docs

Link to invocation

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator

LGTM, docs look clean. I guess one question is how we will keep this updated - if we add a new transform, will we get a KeyError or something in this trtllm_auto_deploy script? Does it depend on whether it is in an existing stage or in a new stage?

For a new transform in an existing configured stage the doc generation is automatic. But a new stage needs a docs page/toctree entry for it to show up as a stage page.

Hmm, is there any way to write some sort of validation or test that would tell us if a stage was missing in the docs? Not blocking the merging of this PR because I think it will likely be obvious and I don't know if adding a stage will be common, but it could be nice.

@bmarimuthu-nv

Copy link
Copy Markdown
Collaborator Author

is there any way to write some sort of validation or test that would tell us if a stage was missing in the docs?

I don't know if there's something that checks for docs against code, but that could be nice. But yeah, doc generation for new transforms to existing stages is automated which is the common case.

@bmarimuthu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "A10-Build_Docs"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52904 [ run ] triggered by Bot. Commit: f56aaa0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52904 [ run ] completed with state SUCCESS. Commit: f56aaa0
/LLM/main/L0_MergeRequest_PR pipeline #42151 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@bmarimuthu-nv
bmarimuthu-nv merged commit 64497e2 into NVIDIA:main Jun 9, 2026
17 of 20 checks passed
crazydemo pushed a commit to crazydemo/TensorRT-LLM that referenced this pull request Jun 9, 2026
Signed-off-by: Balamurugan Marimuthu <246387390+bmarimuthu-nv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants