KEMBAR78
[None][chore] AutoDeploy: neat disablement of transforms in pipeline by lucaslie · Pull Request #7736 · NVIDIA/TensorRT-LLM · GitHub
Skip to content

Conversation

@lucaslie
Copy link
Member

@lucaslie lucaslie commented Sep 15, 2025

Summary by CodeRabbit

  • Chores

    • Made post-load fusion options (GEMM, FP4 GEMM, FP8 GEMM, MoE) explicitly configurable and set them disabled by default for consistent out‑of‑the‑box behavior.
    • Surfaced these toggles in the configuration so users can easily enable them if desired.
    • No change to effective defaults; this clarifies and standardizes configuration.
  • Documentation

    • Added clarifying notes around RMSNorm fusion settings to improve readability of configuration.

Description

By not commenting out a transform in default.yaml and instead use the keyword enabled: false the pipeline can more easily be reconfigured via an extra yaml or the appropriate CLI flag. For example, to enable fuse_moe for a single experiment you can now just run:

python build_and_run_ad.py --args.transforms.fuse_moe.enabled=true

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)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • 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

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@lucaslie lucaslie requested a review from a team as a code owner September 15, 2025 14:01
@lucaslie lucaslie requested review from galagam and nzmora-nvidia and removed request for nvchenghaoz September 15, 2025 14:01
@lucaslie lucaslie self-assigned this Sep 15, 2025
@lucaslie lucaslie moved this from Backlog to In review in AutoDeploy Board Sep 15, 2025
@lucaslie
Copy link
Member Author

/bot run

@lucaslie lucaslie requested a review from Fridah-nv September 15, 2025 14:06
@tensorrt-cicd
Copy link
Collaborator

PR_Github #18644 [ run ] triggered by Bot

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

📝 Walkthrough

Walkthrough

The default auto-deploy config updates post_load_fusion entries to explicitly include enabled: false for fuse_gemms, fuse_fp4_gemms, fuse_fp8_gemms, and fuse_moe. Previously commented-out blocks are now concrete entries. fuse_rmsnorm gains inline TODO comments without behavior change.

Changes

Cohort / File(s) Summary
Config: post_load_fusion settings
tensorrt_llm/_torch/auto_deploy/config/default.yaml
Converted previously commented fusion blocks into explicit entries with enabled: false for fuse_gemms, fuse_fp4_gemms, fuse_fp8_gemms, and fuse_moe. Added TODO comments to fuse_rmsnorm without changing behavior.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as App
  participant Config as default.yaml
  participant Loader as Config Loader
  participant Fusion as PostLoadFusionManager
  App->>Loader: Initialize
  Loader->>Config: Read settings
  Config-->>Loader: post_load_fusion entries
  Loader->>Fusion: Configure transforms
  loop For each transform
    Fusion->>Fusion: Check enabled flag
    alt enabled == true
      Fusion->>App: Apply transform
    else enabled == false
      Fusion-->>App: Skip transform
    end
  end
  note over Fusion,App: Explicitly disabled by default: fuse_gemms, fuse_fp4_gemms, fuse_fp8_gemms, fuse_moe
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[None][chore] AutoDeploy: neat disablement of transforms in pipeline" accurately and concisely summarizes the primary change — explicitly disabling several AutoDeploy post-load fusion transforms in the default config — and follows the repository's title template including the "[None][chore]" prefix. It is specific and readable for a teammate scanning history.
Description Check ✅ Passed The PR description includes a clear "Description" that explains what changed and why (switching commented transforms to explicit enabled:false with an example CLI flag) but leaves the "Test Coverage" section empty and contains unedited template placeholders; required details about tests, CI validation, and any impact/rollback considerations are missing. Because the core rationale is present the description is mostly complete but requires added test coverage and a brief notes section stating scope and any required follow-up.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
tensorrt_llm/_torch/auto_deploy/config/default.yaml (3)

80-88: Consider a single feature flag to re-enable GEMM fusions for perf testing.

Disabling three GEMM fusion variants is clear, but it’s convenient to flip them on together for triage/experiments (e.g., a top-level --enable_gemm_fusions or an env var that overrides enabled:false).

Example override pattern (if your loader supports it):

 # Pseudocode: apply late overrides when env/CLI flag is set
-if overrides.enable_gemm_fusions:
-  for k in ["fuse_gemms", "fuse_fp4_gemms", "fuse_fp8_gemms"]:
-    cfg.transforms[k].enabled = True

97-97: Double-check interactions with earlier MOE quantization passes.

quantize_fp8_moe / quantize_nvfp4_moe earlier in the pipeline may rely on or benefit from fuse_moe. Disabling fuse_moe can be perf-only, but verify it doesn’t affect graph correctness or expected kernels.

Please run the MOE model e2e pipeline (small config) and confirm graph equivalence and no perf regressions beyond the known OOM avoidance goal.


103-104: Make backend selection a first-class knob now (defaulting to flashinfer).

Since fuse_rmsnorm is kept enabled, add a backend override in the same config section (and plumb it through) so CI/perf triage can switch between backends without editing YAML.

Proposed minimal addition (if supported by the loader):

 fuse_rmsnorm:
   # TODO (lucaslie): add backend selection as part of configurable inference optimizers
   # check if we can fuse rmsnorm
   stage: post_load_fusion
-  backend: flashinfer
+  backend: flashinfer  # default
+  # override_backend_env: TLLM_FUSE_RMSNORM_BACKEND  # optional: env override
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7deefb3 and 39144d9.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/auto_deploy/config/default.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (1)
tensorrt_llm/_torch/auto_deploy/config/default.yaml (1)

80-88: ```shell
#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"
echo "Top-level files:"
ls -la || true

echo; echo "1) Find auto_deploy paths and default.yaml files"
rg -n --hidden -S 'auto_deploy' || true
rg -n --hidden -S 'default.yaml' || true

echo; echo "2) Show tensorrt_llm/_torch/auto_deploy/config/default.yaml if present"
FILE="tensorrt_llm/_torch/auto_deploy/config/default.yaml"
if [ -f "$FILE" ]; then
echo "---- $FILE ----"
sed -n '1,240p' "$FILE" || true
else
echo "$FILE not found"
fi

echo; echo "3) Search for uses of the 'enabled' flag under tensorrt_llm"
rg -n -C3 --hidden -S '\bget(["'"'"']enabled["'"'"'])|\benabled\b|config.get(["'"'"']enabled["'"'"'])' tensorrt_llm || true

echo; echo "4) Search for transform iteration / scheduling patterns"
rg -n -C3 --hidden -S '\btransforms\b|\bpasses\b|for\s+\w+\s+in\s+.*transforms' tensorrt_llm || true

echo; echo "5) Search for specific fuse transform names"
rg -n -C3 --hidden -S 'fuse_gemms|fuse_fp4_gemms|fuse_fp8_gemms|post_load_fusion' tensorrt_llm || true

echo; echo "6) Search for YAML/config loading code that may map YAML to runtime objects"
rg -n -C3 --hidden -S 'yaml.safe_load|yaml.load|OmegaConf|from_yaml|load_yaml|omegaconf' tensorrt_llm || true

echo; echo "7) As a fallback, search for 'enabled' across the whole repo (may be noisy)"
rg -n --hidden -S '\benabled\b' || true

echo; echo "Done."


</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@lucaslie lucaslie force-pushed the ll/neat_transform_disabling branch from 39144d9 to 0901d83 Compare September 15, 2025 14:08
@lucaslie
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18648 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18644 [ run ] completed with state ABORTED
LLM/main/L0_MergeRequest_PR #14001 (Blue Ocean) completed with status: ABORTED

@lucaslie lucaslie enabled auto-merge (squash) September 15, 2025 14:22
Copy link
Collaborator

@galagam galagam left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18648 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #14005 completed with status: 'FAILURE'

@lucaslie
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18662 [ run ] triggered by Bot

Copy link
Collaborator

@Fridah-nv Fridah-nv left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for taking care of disabling fuse_moe

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18662 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #14018 completed with status: 'FAILURE'

@lucaslie
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18665 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18665 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #14021 completed with status: 'FAILURE'

@lucaslie
Copy link
Member Author

/bot run

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
@lucaslie lucaslie force-pushed the ll/neat_transform_disabling branch from 0901d83 to 9874ecd Compare September 15, 2025 23:16
@lucaslie
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18669 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18670 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18669 [ run ] completed with state ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18670 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #14025 completed with status: 'FAILURE'

@lucaslie
Copy link
Member Author

/bot run

@lucaslie
Copy link
Member Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18789 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18789 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #14086 completed with status: 'FAILURE'

@lucaslie
Copy link
Member Author

/bot skip --comment "Unrelated failures, minor changes"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18808 [ skip ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18808 [ skip ] completed with state SUCCESS
Skipping testing for commit 88965fd

@lucaslie lucaslie merged commit 9befd1a into NVIDIA:main Sep 16, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in AutoDeploy Board Sep 16, 2025
Wong4j pushed a commit to Wong4j/TensorRT-LLM that referenced this pull request Sep 20, 2025
…VIDIA#7736)

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
MrGeva pushed a commit to nv-auto-deploy/TensorRT-LLM that referenced this pull request Sep 21, 2025
…VIDIA#7736)

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@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

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants