Skip to content

Conversation

xinhe-nv
Copy link
Collaborator

@xinhe-nv xinhe-nv commented Aug 29, 2025

Summary by CodeRabbit

  • Tests
    • Added 2‑GPU GPT‑OSS accuracy tests across backends (CUTLASS, TRT‑LLM, TRITON) and parallelism modes (tp2, ep2, dp2); expanded 1/4‑GPU matrices.
    • Updated test selections in multiple suites (full, nim, sanity) to broaden coverage, including new 4‑GPU variants.
    • Adjusted memory gating to run on lower‑memory devices and localized model path usage in tests.
    • Updated test database to include a new 4‑GPU entry.
    • Revised skip list to manage expanded GPT‑OSS variants while retaining existing waivers.
    • local test report https://prod.blsm.nvidia.com/swqa-tensorrt-qa-test/view/TRT-LLM-Function-Pipelines/job/DEBUG_LLM_FUNCTION_TEST/1714/testReport/

Description

add gpt-oss 20g test cases,
gpt-oss 20g -> 1/2 gpu
gpt-oss 120g -> 4gpus

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.

Copy link
Contributor

coderabbitai bot commented Aug 29, 2025

📝 Walkthrough

Walkthrough

Adds a 2-GPU GPT-OSS test to the PyTorch LLM accuracy suite, adjusts an existing 1-GPU test model path, lowers a memory skip threshold, and updates multiple test lists (QA, sanity, NIM, DGX B200 test-db, waives) to expand and selectively skip GPT-OSS variants across backends and parallelism modes.

Changes

Cohort / File(s) Summary
GPT-OSS PyTorch tests
tests/integration/defs/accuracy/test_llm_api_pytorch.py
Added test_w4_2gpus with parameterized backends (CUTLASS/TRTLLM/TRITON) and (tp2/pp?/ep2/dp2) combos, guarded by skip_less_device(2); set local MODEL_PATH to .../gpt_oss/gpt-oss-20b; lowered class-level memory gate to 80000; kept GSM8K eval flow and Triton checks; explicit max_seq_len and MoeConfig settings.
QA test list (full)
tests/integration/test_lists/qa/llm_function_full.txt
Reworked GPT-OSS selections: removed some 1GPU TRTLLM and 4GPU variants; added broader 1/2/4-GPU matrices across backends and parallelism (tp/ep/dp). Included additional disaggregated serving scenarios for Llama3.1 8B variants.
QA test list (nim)
tests/integration/test_lists/qa/llm_function_nim.txt
Added many GPT-OSS entries spanning 1, 2, and 4 GPUs with CUTLASS/TRITON/TRTLLM and W4 (incl. w4a16 dp4) configurations.
Sanity manifest
tests/integration/test_lists/qa/llm_function_sanity.txt
Added nine 2-GPU TestGPTOSS::test_w4_2gpus variants: tp2/ep2/dp2 x {cutlass,trtllm,triton}.
DGX B200 test-db
tests/integration/test_lists/test-db/l0_dgx_b200.yml
Added accuracy/test_llm_api_pytorch.py::TestGPTOSS::test_w4_4gpus[dp4-cutlass] to pre_merge 4-GPU block.
Waives/skip list
tests/integration/test_lists/waives.txt
Removed one EXAONE4 skip, re-added it, and added multiple GPT-OSS skip entries for 2-GPU and 4-GPU cutlass variants (tp/ep/dp).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant T as TestGPTOSS (pytest)
  participant L as LLM.init (PyTorch)
  participant B as Backend (CUTLASS/TRTLLM/TRITON)
  participant E as Evaluator (GSM8K)
  participant D as Dataset (GSM8K)
  Note over T: test_w4_1gpu / test_w4_2gpus
  T->>L: Construct LLM(model_path=gpt-oss-20b,<br/>gpus=1 or 2, max_seq_len=8192,<br/>MoeConfig(backend))
  L->>B: Initialize kernels / runtime<br/>(triton check if needed)
  T->>E: Run evaluation(extra_evaluator_kwargs)
  E->>D: Load samples
  E->>L: Generate answers
  L->>B: Execute inference (tp/ep/dp as configured)
  E-->>T: Return metrics
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • byshiue
  • crazydemo
  • LarryXFly
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 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 or @coderabbit 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.

@xinhe-nv xinhe-nv force-pushed the user/xinhe/gptoss branch 2 times, most recently from b44d830 to 3f48a46 Compare August 29, 2025 09:15
@xinhe-nv xinhe-nv force-pushed the user/xinhe/gptoss branch 7 times, most recently from 3ff58ed to 61783c7 Compare September 3, 2025 07:03
@xinhe-nv xinhe-nv marked this pull request as ready for review September 3, 2025 07:06
@xinhe-nv xinhe-nv enabled auto-merge (squash) September 3, 2025 07:06
@xinhe-nv
Copy link
Collaborator Author

xinhe-nv commented Sep 3, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17501 [ run ] triggered by Bot

@xinhe-nv
Copy link
Collaborator Author

xinhe-nv commented Sep 3, 2025

/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: 3

🧹 Nitpick comments (4)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (4)

2857-2857: Avoid shadowing class attribute MODEL_PATH.

Using a local MODEL_PATH for the 20B path shadows the class-level 120B path and can confuse readers. Rename the local to model_path_20b.

Apply:

-        MODEL_PATH = f"{llm_models_root()}/gpt_oss/gpt-oss-20b"
+        model_path_20b = f"{llm_models_root()}/gpt_oss/gpt-oss-20b"

2868-2875: Use the renamed variable for clarity.

Apply:

-        llm = LLM(MODEL_PATH,
+        llm = LLM(model_path_20b,
                   tensor_parallel_size=1,
                   pipeline_parallel_size=1,
                   moe_expert_parallel_size=1,
                   kv_cache_config=self.kv_cache_config,
                   **pytorch_config,
                   moe_config=MoeConfig(backend=moe_backend))

2971-2975: Minor: duplicate 20B path string.

The 20B path is now defined in two tests. Consider a class-level MODEL_PATH_20B or a small helper to DRY.

If desired, add near line 2846:

MODEL_PATH_20B = f"{llm_models_root()}/gpt_oss/gpt-oss-20b"

Then use MODEL_PATH_20B in both tests.


2980-2989: Max seq len only set for 2-GPU.

Not wrong, but it diverges from 1-GPU/4-GPU configs. If this was added to avoid warmup OOM, consider a brief comment to document the rationale.

📜 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 79d93f9 and 61783c7.

📒 Files selected for processing (6)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (4 hunks)
  • tests/integration/test_lists/qa/llm_function_full.txt (1 hunks)
  • tests/integration/test_lists/qa/llm_function_nim.txt (1 hunks)
  • tests/integration/test_lists/qa/llm_function_sanity.txt (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
  • tests/integration/test_lists/waives.txt (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Filenames compiled into a target must be case-insensitively unique

Files:

  • tests/integration/test_lists/qa/llm_function_nim.txt
  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/test_lists/waives.txt
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/qa/llm_function_full.txt
**/*.{h,hpp,hh,hxx,cc,cpp,cxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Use spaces, not tabs; indent 4 spaces

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.py

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.py: Code must target Python 3.8+
Indent with 4 spaces; do not use tabs (Python)
Maintain module namespace on import: prefer from package.subpackage import foo; use foo.Symbol()
Python filenames use snake_case
Python class names use PascalCase
Python functions and methods use snake_case
Python local variables use snake_case; if starting with a number concept, prefix with k (e.g., k_99th_percentile)
Python global variables use G_ prefix with UPPER_SNAKE_CASE
Python constants use UPPER_SNAKE_CASE
Avoid shadowing variables from outer scopes
Initialize all externally visible class members in init
For public interfaces, prefer docstrings over comments; comments should be for in-function or file-local interfaces
Use Google-style docstrings for classes and functions (Sphinx-parsable)
Document attributes and variables inline with docstrings immediately after assignment
Avoid reflection when a non-reflective approach suffices
Limit except clauses to specific exceptions where possible
When using try/except for duck-typing, keep try body minimal and move logic to else

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,cc,cxx,h,hpp,hh,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Prepend NVIDIA copyright header (current year) to all source files

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🧠 Learnings (4)
📓 Common learnings
Learnt from: pengbowang-nv
PR: NVIDIA/TensorRT-LLM#7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").
📚 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/qa/llm_function_nim.txt
  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/qa/llm_function_full.txt
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
PR: NVIDIA/TensorRT-LLM#7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").

Applied to files:

  • tests/integration/test_lists/qa/llm_function_sanity.txt
  • tests/integration/test_lists/waives.txt
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/qa/llm_function_full.txt
📚 Learning: 2025-08-29T14:07:45.863Z
Learnt from: EmmaQiaoCh
PR: NVIDIA/TensorRT-LLM#7370
File: tests/unittest/trt/model_api/test_model_quantization.py:24-27
Timestamp: 2025-08-29T14:07:45.863Z
Learning: In TensorRT-LLM's CI infrastructure, pytest skip markers (pytest.mark.skip) are properly honored even when test files have __main__ blocks that call test functions directly. The testing system correctly skips tests without requiring modifications to the __main__ block execution pattern.

Applied to files:

  • tests/integration/test_lists/waives.txt
🧬 Code graph analysis (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (4)
tests/integration/defs/conftest.py (1)
  • llm_models_root (77-83)
tensorrt_llm/llmapi/llm.py (1)
  • LLM (1013-1029)
tensorrt_llm/llmapi/llm_args.py (2)
  • CudaGraphConfig (108-165)
  • MoeConfig (168-196)
tests/integration/defs/accuracy/accuracy_core.py (3)
  • GSM8K (293-308)
  • evaluate (147-206)
  • evaluate (707-717)
⏰ 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 (6)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (2)

2838-2839: Lowered memory gate: please verify 120B 4-GPU still safe on 80 GB devices.

Dropping skip_less_device_memory from 100000 to 80000 widens coverage but may risk OOM for the 120B 4-GPU cases on 80 GB SKUs if fragmentation spikes. Consider per-test gating (80 GB for 20B 1/2-GPU; higher for 120B 4-GPU) if we see flakes.


2956-2969: Nice addition: 2-GPU coverage across tp/ep/dp and backends.

Param matrix and TRITON availability guard look good.

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

121-121: Good addition: add dp4-cutlass to post-merge 4×B200.

Matches existing matrix (dp4-trtllm/triton present). Ordering and id format align with test parametrization; scheduling’s wildcard rules will avoid dupes across files.

tests/integration/test_lists/qa/llm_function_nim.txt (1)

13-34: NIM list expansion looks consistent with param ids.

  • 1-GPU ids: (cuda_graph, overlap_scheduler, backend)True-True-<backend>
  • 2/4-GPU ids: (tp/ep/dp)-(backend), matching source decorators
  • Consider sorting blocks by backend or world-size for readability if this grows

To sanity-check collection names locally run:

#!/bin/bash
pytest -q --collect-only tests/integration/defs/accuracy/test_llm_api_pytorch.py::TestGPTOSS \
  | rg -n -C0 "test_w4_(1gpu|2gpus|4gpus)"
tests/integration/test_lists/qa/llm_function_sanity.txt (1)

51-59: Param IDs align with test definition; no action required.

tests/integration/test_lists/qa/llm_function_full.txt (1)

553-571: GPTOSS GPU-grid model-paths are correct
1/2-GPU cases explicitly override MODEL_PATH to gpt-oss-20b; 4-GPU cases inherit the class-level MODEL_PATH (gpt-oss-120b) as intended.
Nit: group the new 1G/2G/4G test blocks under comment headers to prevent future drift.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17505 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17501 [ run ] completed with state ABORTED

@xinhe-nv
Copy link
Collaborator Author

xinhe-nv commented Sep 3, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17508 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17505 [ run ] completed with state ABORTED

@tensorrt-cicd
Copy link
Collaborator

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

@xinhe-nv xinhe-nv force-pushed the user/xinhe/gptoss branch 6 times, most recently from d2e57ba to 05bf970 Compare September 5, 2025 03:18
Signed-off-by: Xin He (SW-GPU) <[email protected]>
@xinhe-nv
Copy link
Collaborator Author

xinhe-nv commented Sep 5, 2025

/bot reuse-pipeline

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17752 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17752 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #17508 for commit 9b87837

@xinhe-nv xinhe-nv merged commit 8e3962d into NVIDIA:main Sep 5, 2025
5 checks passed
@xinhe-nv xinhe-nv deleted the user/xinhe/gptoss branch September 5, 2025 07:14
Wong4j pushed a commit to Wong4j/TensorRT-LLM that referenced this pull request Sep 20, 2025
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.

6 participants