Skip to content

[https://nvbugs/5930934][fix] Cherry-pick fix NCCL OOM hang - #11916

Merged
pcastonguay merged 1 commit into
NVIDIA:release/1.3.0rc5.post1from
pcastonguay:cherry_pick_nccl_oom
Mar 5, 2026
Merged

[https://nvbugs/5930934][fix] Cherry-pick fix NCCL OOM hang#11916
pcastonguay merged 1 commit into
NVIDIA:release/1.3.0rc5.post1from
pcastonguay:cherry_pick_nccl_oom

Conversation

@pcastonguay

@pcastonguay pcastonguay commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced stability by preventing potential deadlock scenarios during distributed computation operations under memory-constrained conditions.
  • Refactor

    • Optimized memory efficiency by reducing peak memory consumption through improved tensor operation handling in model inference.

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)

  • 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.

@coderabbitai

coderabbitai Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Two optimization changes: fallback behavior for AllReduce tactic selection now defaults to plain NCCL instead of NCCL_SYMMETRIC to avoid potential deadlocks, and in-place tensor additions replace out-of-place operations in the DeepSeek V3 model to reduce peak memory usage.

Changes

Cohort / File(s) Summary
AllReduce Tactic Selection
tensorrt_llm/_torch/custom_ops/torch_custom_ops.py
Cache miss fallback changed from NCCL_SYMMETRIC to plain NCCL (NCCL.value) due to deadlock risk under out-of-memory conditions with ncclMemAlloc.
Memory Optimization
tensorrt_llm/_torch/models/modeling_deepseekv3.py
In-place tensor additions replace out-of-place operations in moe_reduce_add_shared_output and _compute_routed_output to reduce temporary allocations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description contains only the template structure with an empty Description section and uncompleted Test Coverage section, lacking substantive details about the changes, rationale, or test safeguards. Complete the Description section with details about the OOM hang issue and the fix, and provide specific test coverage details that safeguard the changes in the PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions fixing NCCL OOM hang, which directly aligns with the primary change: modifying AllReduce fallback behavior from NCCL_SYMMETRIC to NCCL to prevent deadlocks under OOM conditions.

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

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

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

…ck during long-context inference (NVIDIA#11870)

Signed-off-by: peihu-nv <259410613+peihu-nv@users.noreply.github.com>
Signed-off-by: Patrice Castonguay <55748270+pcastonguay@users.noreply.github.com>
@pcastonguay
pcastonguay force-pushed the cherry_pick_nccl_oom branch from 7e54c02 to a801189 Compare March 4, 2026 17:08
@pcastonguay

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@pcastonguay pcastonguay changed the title [https://nvbugs/5930934][fix] Cherry-pick Fix OOM hang with NCCL_SYMMETRIC fallback during long-context inference [https://nvbugs/5930934][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC fallback during long-context inference Mar 4, 2026
@pcastonguay pcastonguay changed the title [https://nvbugs/5930934][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC fallback during long-context inference [https://nvbugs/5930934][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC Mar 4, 2026
@pcastonguay pcastonguay changed the title [https://nvbugs/5930934][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC [None][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC Mar 4, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37738 [ run ] triggered by Bot. Commit: a801189 Link to invocation

@pcastonguay pcastonguay changed the title [None][fix] Cherry-pick fix OOM hang with NCCL_SYMMETRIC [None][fix] Cherry-pick fix OOM hang Mar 4, 2026
@pcastonguay pcastonguay changed the title [None][fix] Cherry-pick fix OOM hang [None][fix] Cherry-pick fix NCCL OOM hang Mar 4, 2026
@pcastonguay pcastonguay changed the title [None][fix] Cherry-pick fix NCCL OOM hang [https://nvbugs/5930934][fix] Cherry-pick fix NCCL OOM hang Mar 4, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37738 [ run ] completed with state SUCCESS. Commit: a801189
/LLM/release-1.3.0rc5.post1/L0_MergeRequest_PR pipeline #17 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@peihu-nv

peihu-nv commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37764 [ run ] triggered by Bot. Commit: a801189 Link to invocation

@pcastonguay
pcastonguay enabled auto-merge (squash) March 5, 2026 03:02
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37764 [ run ] completed with state SUCCESS. Commit: a801189
/LLM/release-1.3.0rc5.post1/L0_MergeRequest_PR pipeline #18 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@pcastonguay

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "Flaky multi-GPU tests"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37858 [ skip ] triggered by Bot. Commit: a801189 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #37858 [ skip ] completed with state SUCCESS. Commit: a801189
Skipping testing for commit a801189

Link to invocation

@pcastonguay
pcastonguay merged commit fdeaaa9 into NVIDIA:release/1.3.0rc5.post1 Mar 5, 2026
13 of 17 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.

6 participants