Skip to content

[None][test] Fix the multinode test case on DGX-Spark(perf skipped and func hang)#16209

Open
JennyLiu-nv wants to merge 2 commits into
NVIDIA:mainfrom
JennyLiu-nv:spark-multinode-improve
Open

[None][test] Fix the multinode test case on DGX-Spark(perf skipped and func hang)#16209
JennyLiu-nv wants to merge 2 commits into
NVIDIA:mainfrom
JennyLiu-nv:spark-multinode-improve

Conversation

@JennyLiu-nv

@JennyLiu-nv JennyLiu-nv commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Tests
    • Improved GPU detection for performance test execution, including support for configured GPU-count overrides and more reliable fallback handling.
    • Updated the advanced multinode quickstart validation to run through the PyTorch backend directly.
    • Added coverage for tensor and pipeline parallelism, CUDA graphs, KV cache settings, and model-specific expert parallelism.
    • Simplified validation to confirm that text generation produces non-empty output.

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: Jenny Liu <JennyLiu-nv+JennyLiu@users.noreply.github.com>
@JennyLiu-nv JennyLiu-nv requested review from a team as code owners July 10, 2026 02:20
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The changes revise GPU availability detection for performance-test skipping and replace a subprocess-based multinode quickstart test with direct PyTorch backend LLM execution and generation validation.

Changes

Integration test updates

Layer / File(s) Summary
GPU availability skip detection
tests/integration/defs/perf/test_perf.py
PerfTestConfig.validate() now honors TRTLLM_TOTAL_GPU_COUNT, otherwise derives GPU availability from MPI world size and local device count with fallbacks.
Direct PyTorch multinode execution
tests/integration/defs/test_e2e.py
The multinode test now configures and runs tensorrt_llm.LLM directly, then asserts generated text is non-empty.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks filled Description and Test Coverage sections and mostly contains dry-run links and the template. Add a concise problem/solution description and list the tests that validate the DGX-Spark multinode changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and matches the DGX-Spark multinode test fix and its perf/func issues.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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

🧹 Nitpick comments (1)
tests/integration/defs/test_e2e.py (1)

2224-2241: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

No timeout safeguard on the call that previously hung.

The PR's own objective is fixing a functional hang in this exact test. The new direct LLM(...)/generate() call still has no explicit timeout, so if it hangs again (e.g. an MPI synchronization stall across multi-node ranks), CI will block indefinitely rather than failing fast with a diagnosable error.

Per tests/README.md, this repo supports a TIMEOUT (N) marker settable per test case in the relevant test-list yml specifically for hang-prone cases — worth confirming one is applied here given this test's history.

🤖 Prompt for 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.

In `@tests/integration/defs/test_e2e.py` around lines 2224 - 2241, Ensure the test
invoking LLM and generate has an explicit timeout safeguard so MPI or
synchronization hangs fail fast instead of blocking CI indefinitely. Use the
repository’s supported TIMEOUT (N) mechanism by adding or confirming the
appropriate timeout marker for this test in its relevant test-list
configuration, and verify it covers the direct LLM(...)/generate() call.
🤖 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 `@tests/integration/defs/perf/test_perf.py`:
- Around line 841-859: Update the GPU-count detection around
get_mpi_world_size() and get_device_count() to fail closed: catch only the
expected device/MPI availability exceptions, and default a failed device count
to 0 so single-node detection cannot leave total_gpus as None and bypass the
pytest.skip guard. Preserve the TRTLLM_TOTAL_GPU_COUNT override and ensure the
existing self.num_gpus comparison skips when detection fails.

---

Nitpick comments:
In `@tests/integration/defs/test_e2e.py`:
- Around line 2224-2241: Ensure the test invoking LLM and generate has an
explicit timeout safeguard so MPI or synchronization hangs fail fast instead of
blocking CI indefinitely. Use the repository’s supported TIMEOUT (N) mechanism
by adding or confirming the appropriate timeout marker for this test in its
relevant test-list configuration, and verify it covers the direct
LLM(...)/generate() call.
🪄 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: 47e2939c-95e3-4a20-be26-e2a3c9c5dccf

📥 Commits

Reviewing files that changed from the base of the PR and between 6b9f6dc and 7cb4ab9.

📒 Files selected for processing (2)
  • tests/integration/defs/perf/test_perf.py
  • tests/integration/defs/test_e2e.py

Comment thread tests/integration/defs/perf/test_perf.py
@JennyLiu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@JennyLiu-nv JennyLiu-nv enabled auto-merge (squash) July 10, 2026 02:47
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58563 [ run ] triggered by Bot. Commit: c0261ef Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58563 [ run ] completed with state SUCCESS. Commit: c0261ef
/LLM/main/L0_MergeRequest_PR pipeline #47159 completed with status: 'SUCCESS'

CI Report

Link to invocation

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.

2 participants