Skip to content

Conversation

@ajrasane
Copy link
Collaborator

@ajrasane ajrasane commented Aug 22, 2025

Summary by CodeRabbit

  • Tests

    • Added a new AutoDeploy dtype test across multiple PyTorch suites and GPU configurations, with new “AutoDeploy tests” section headers.
  • Bug Fixes

    • Adjusted token-handling in the AutoDeploy attention path to correct ordering behavior affecting inference updates.
  • Chores

    • Updated integration test lists and configurations without changing public APIs or product behavior.

Description

Added auto deploy accuracy test to test.yml files

Test Coverage

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

📝 Walkthrough

Walkthrough

Adds a new AutoDeploy dtype accuracy test entry to multiple integration test-list YAMLs and changes the attention custom op to stop sorting indices before applying new tokens; no public APIs or other tests were modified.

Changes

Cohort / File(s) Summary of Changes
Add AutoDeploy dtype test
tests/integration/test_lists/test-db/l0_b200.yml, tests/integration/test_lists/test-db/l0_dgx_b200.yml, tests/integration/test_lists/test-db/l0_dgx_h100.yml, tests/integration/test_lists/test-db/l0_dgx_h200.yml, tests/integration/test_lists/test-db/l0_h100.yml, tests/integration/test_lists/test-db/l0_gb200.yml
Inserted a header # ------------- AutoDeploy tests --------------- and added accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype into PyTorch test sections. In l0_dgx_h100.yml, l0_dgx_h200.yml, and l0_h100.yml the entry was added in two separate PyTorch blocks.
Custom op: attention index ordering change
tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py
Removed sorting of idx prior to gathering new_tokens and masked_scatter; idx is now used in its original order. No signature changes.

Sequence Diagram(s)

sequenceDiagram
  participant Caller as ModelForward
  participant Op as attention_interface.update_input_ids_with_new_tokens
  participant Device as GPU_Tensors

  Note over Caller,Op: Inputs: input_ids, new_tokens, idx, mask
  Caller->>Op: call update_input_ids_with_new_tokens(...)
  Op->>Device: ensure tensors on device
  alt previous behavior
    Op->>Op: sort(idx)
    Op->>Op: gather new_tokens[0, sorted_idx, 0]
    Op->>Op: masked_scatter using sorted_idx
  else new behavior
    Op->>Op: gather new_tokens[0, idx, 0]
    Op->>Op: masked_scatter using original idx
  end
  Op->>Caller: return updated input_ids
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Community want to contribute

Suggested reviewers

  • lucaslie
  • syuoni
  • galagam

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@suyoggupta
Copy link
Collaborator

/bot run

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 (1)
tests/integration/test_lists/test-db/l0_gb200.yml (1)

39-40: Optional: add an explicit timeout budget to protect the pre-merge queue.

Many long-running accuracy tests carry a TIMEOUT annotation in these lists. If this auto-deploy flow can occasionally exceed expected runtime, consider adding a conservative timeout to avoid wedging the lane.

Example diff (tweak the budget to your lane’s norms):

-  - accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype
+  - accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype TIMEOUT (60)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 81fd468 and 2fb395e.

📒 Files selected for processing (6)
  • tests/integration/test_lists/test-db/l0_b200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_h100.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_h200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_gb200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_h100.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_h200.yml
🔇 Additional comments (7)
tests/integration/test_lists/test-db/l0_dgx_b200.yml (1)

92-93: Addition of AutoDeploy test is consistent with the PR objective.

The addition of the AutoDeploy test entry with proper header formatting follows the pattern established across other test configuration files in this PR.

tests/integration/test_lists/test-db/l0_b200.yml (1)

72-73: Addition of AutoDeploy test is consistent with the PR objective.

The addition of the AutoDeploy test entry with proper header formatting follows the pattern established across other test configuration files in this PR.

tests/integration/test_lists/test-db/l0_dgx_h200.yml (2)

37-38: Addition of AutoDeploy test is consistent with the PR objective.

The addition of the AutoDeploy test entry with proper header formatting follows the pattern established across other test configuration files in this PR. This is the first insertion for the 8-GPU configuration.


118-119: AutoDeploy test entries consistent across all test-db files

All AutoDeploy test sections under tests/integration/test_lists/test-db/ share the same header and test path format:

  • Header comment: # ------------- AutoDeploy tests ---------------
  • Test entry: - accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype

No discrepancies were detected.

tests/integration/test_lists/test-db/l0_h100.yml (1)

105-106: Addition of AutoDeploy test is consistent with the PR objective.

The addition of the AutoDeploy test entry with proper header formatting follows the pattern established across other test configuration files in this PR. The test is appropriately placed in the pre_merge PyTorch backend section.

tests/integration/test_lists/test-db/l0_dgx_h100.yml (1)

64-65: Addition of AutoDeploy test is consistent with the PR objective.

The addition of the AutoDeploy test entry with proper header formatting follows the pattern established across other test configuration files in this PR. This is the first insertion for the general pre_merge PyTorch backend section.

tests/integration/test_lists/test-db/l0_gb200.yml (1)

39-40: Verified AutoDeploy dtype test mapping and skip markers

All checks passed for the new AutoDeploy dtype accuracy test in the GB200 pre-merge bucket:

  • Consistent inclusion:
    The test appears under the “AutoDeploy tests” section in every relevant l0_* YAML (l0_h100, l0_gb200, l0_dgx_h200, l0_dgx_h100, l0_dgx_b200, l0_b200).
  • Dynamic stage mapping:
    The scripts/test_to_stage_mapping.py script dynamically reads each YAML’s terms.stage: pre_merge entry, so this test will be routed to the correct pre-merge Jenkins stage for GB200.
  • Skip marker validation:
    The only decorator is @pytest.mark.skip_less_device_memory(32000), which does not affect GB200 (each GB200 GPU has ≥32 GB memory), so the test will run as expected.

No further changes are needed.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16223 [ run ] triggered by Bot

@suyoggupta suyoggupta changed the title [None][CICD] Enable auto deploy tests [None][chore] Enable auto deploy tests Aug 22, 2025
@tensorrt-cicd
Copy link
Collaborator

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

@suyoggupta suyoggupta requested a review from a team as a code owner August 23, 2025 06:18
@suyoggupta suyoggupta requested a review from lucaslie August 23, 2025 06:18
@suyoggupta
Copy link
Collaborator

/bot run

@suyoggupta suyoggupta requested review from a team, galagam and lucaslie and removed request for a team and lucaslie August 23, 2025 06:19
@tensorrt-cicd
Copy link
Collaborator

PR_Github #16252 [ run ] triggered by Bot

@suyoggupta suyoggupta changed the title [None][chore] Enable auto deploy tests [None][chore] Enable auto deploy accuracy test in CI Aug 23, 2025
@tensorrt-cicd
Copy link
Collaborator

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

@suyoggupta
Copy link
Collaborator

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16272 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

@suyoggupta
Copy link
Collaborator

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16279 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16280 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16279 [ reuse-pipeline ] completed with state ABORTED
Can't reuse PR_Github #0 with status: UNKNOWN

@tensorrt-cicd
Copy link
Collaborator

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

@suyoggupta
Copy link
Collaborator

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16284 [ run ] triggered by Bot

@suyoggupta suyoggupta requested a review from syuoni August 23, 2025 19:35
@suyoggupta
Copy link
Collaborator

hi @syuoni , Could you take a look and confirm if this is the correct way to add accuracy test to CI?

@tensorrt-cicd
Copy link
Collaborator

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

@suyoggupta
Copy link
Collaborator

/bot reuse-pipeline

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16319 [ reuse-pipeline ] triggered by Bot

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: 2

🧹 Nitpick comments (3)
tests/integration/test_lists/test-db/l0_gb200.yml (2)

1-2: If you must keep tests in this file, mirror the "AutoDeploy tests" header for consistency.

Other files introduce an "------------- AutoDeploy tests ---------------" header near the insertion point; this one does not. Consistent headers aid grepping and any lightweight parsers.

Suggested edit near the insertion (if not reverting):

+  # ------------- AutoDeploy tests ---------------
   - accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype

3-18: l0_gb200.yml is unused by any active CI pipeline; it can be safely removed

After searching the repo for references to l0_gb200 (including Jenkins pipelines, scripts, and docs), the only occurrences are in its own YAML (with a “not used” comment) and a commented-out entry in jenkins/L0_Test.groovy. There are no live references to how this test list is consumed. To prevent future drift, please:

  • Delete the file
    tests/integration/test_lists/test-db/l0_gb200.yml
  • Remove the stale commented-out entries at around line 1923 in
    jenkins/L0_Test.groovy
tests/integration/test_lists/test-db/l0_dgx_h200.yml (1)

3-16: Consider also adding the AutoDeploy test to the 4-GPU PyTorch post_merge block if intentional parity is desired.

The 8-GPU block includes it; the 4-GPU block may or may not need it depending on scheduling goals. If the intent is parity across H200 pools, mirror the addition; if not, leave as-is.

If parity is desired, add under the 4-GPU PyTorch block with a matching header:

   tests:
+  # ------------- AutoDeploy tests ---------------
+  - accuracy/test_llm_api_autodeploy.py::TestLlama3_1_8B::test_auto_dtype
   - accuracy/test_llm_api_pytorch.py::TestDeepSeekV3Lite::test_bfloat16_4gpus[tp4-mtp_nextn=0-attention_dp=False-cuda_graph=False-overlap_scheduler=False-torch_compile=False]
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1ed2578 and 33f31a5.

📒 Files selected for processing (3)
  • tests/integration/test_lists/test-db/l0_dgx_h100.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_h200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_gb200.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/integration/test_lists/test-db/l0_dgx_h100.yml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_h200.yml
  • tests/integration/test_lists/test-db/l0_gb200.yml
⏰ 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)
tests/integration/test_lists/test-db/l0_dgx_h200.yml (1)

37-38: LGTM: cleanly scoped AutoDeploy test addition and header.

The grouping header matches conventions used elsewhere; the test path is precise and non-parameterized, which is ideal for stage mapping.

@suyoggupta
Copy link
Collaborator

/bot reuse-pipeline

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16319 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #16284 for commit 33f31a5

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16321 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16321 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #16284 for commit 70ce260

@suyoggupta suyoggupta merged commit 0680566 into NVIDIA:main Aug 24, 2025
4 checks passed
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.

3 participants