Skip to content

[None][test] Guard NCCL scope work and tensor ownership - #21230

Open
ruodil wants to merge 4 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-nccl-scopes
Open

ruodil wants to merge 4 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-nccl-scopes

Conversation

@ruodil

@ruodil ruodil commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Guard peerless forwards against unnecessary NCCL lease-scope work, and preserve activation/output ownership without repeatedly traversing shared metadata, including nested containers and failure unwinding.

Split the nccl module coverage out of #21095 so it can be reviewed independently. This PR contains only its tests and any associated CI-list changes.

The production prerequisite #21095 merged into main as ff1aa0f7d35c on 2026-11-03. This test-only PR now includes that fix through a normal merge of main (fee6cfd872bc) and its original test-source head passed L0 CI. A later empty commit refreshed required GitHub checks. The unchanged current head has now passed the standard L0 retry; see the verified readiness below.

Test Coverage

  • The preserved module coverage passed in a fresh run of the original PR snapshot: 57 CPU, zero failures/errors/skips. The complete original snapshot passed 443 CPU + 9 GPU cases on RTX PRO 6000 Blackwell; this is not a runtime result for the rebased PR head.

  • Previous source head 478282ef8776: all applicable pre-commit hooks passed, including Ruff, formatting, generated-config checks and repository-wide test-list validation; git diff --check passed. Independent review found no current API mismatch. The NCCL model-call test follows the upstream rename to tests/unittest/_torch/pyexecutor/engine/; upstream graph tests and their updated collector fixture are preserved.

  • Historical remote validation of the identical file tree (478282ef8776): L0 pipeline #67850 completed SUCCESS. This supersedes the earlier local collection limitation caused by the host lacking libcuda.so.1. Its original GitHub checks passed at that time; current checks and Code Owner approval remain required.

  • The seven split patches were checked for complete coverage of the original 22-file diff and exact recombination after the required upstream API compatibility changes.

  • CI selection verified on main: CPU coverage is selected by the existing unittest/_torch/pyexecutor directory entry and unittest/_torch/test_nccl_window_graph.py entry in l0_cpu.yml; both changed modules are marked cpu_only. Directory selectors are expanded by tests/integration/defs/test_unittests.py, and Jenkins applies cpu_only / not cpu_only by stage.

PR Checklist

  • Reviewed the applicable repository PR checklist items; the commit includes a DCO sign-off.

Merge readiness (2026-11-20)

Current head 17b9aa57fa93 is a signed-off empty commit with exactly the same Git tree as historical passing head 478282ef8776. DCO, pre-commit, PR title/checklist, base freshness and API-label checks pass. No unresolved review thread remains. GitHub reports this head mergeable, and a local merge-tree check against upstream main 1ea2e764cdec is clean.

The earlier run on this same head, L0 #70873 finished UNSTABLE: 9,879 passed / 170 failed / 1,877 skipped. The raw JUnit archive confirms all 60 PR-specific cases passed on each CPU architecture: 51 graph cases and 9 model-call cases on both x86 and ARM, without skips (120 passes total).

All 170 final failures are in the H100 DGX_H100-PyTorch-1-cbts pyexecutor suite: 90 subcases report HostOOMError: mmap failed: Cannot allocate memory, 79 report a corrupted KV-cache manager after CUDA error 201 (invalid device context), plus one aggregate suite-wrapper failure. The original and superseded JUnit attempts are excluded from those counts. Both changed test modules are outside the failing cases. These are observed runtime/resource symptoms; their underlying cause is not established, and this is not presented as a confirmed infrastructure-only failure.

The requested standard retry completed successfully on November 19: L0 #71125 and PR_Github #85889 both report SUCCESS for unchanged head 17b9aa57fa93, as recorded by the CI bot. The current blossom-ci and DCO checks pass. The earlier failures did not recur in this successful run; their underlying cause remains unproven. No source changes, waivers, dependency pins or manual status overrides were needed. The existing Code Owner approval remains the merge gate. No additional CI retry is needed for this passing head.

@ruodil
ruodil marked this pull request as ready for review November 3, 2026 06:21
@ruodil

ruodil commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82223 [ run ] triggered by Bot. Commit: 478282e Link to invocation

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds CPU-only tests for NCCL window tensor collection and scope behavior. The tests cover eager module calls, ModelEngine peer configurations, nested scopes, and failure recovery.

Changes

NCCL Window Tensor Scopes

Layer / File(s) Summary
Eager module tensor collection
tests/unittest/_torch/test_nccl_window_graph.py
Tests input and output collection for positional and keyword calls, including quantized wrappers, nested containers, aliases, cycles, dataclass metadata, and nested scopes.
ModelEngine scope lifecycle
tests/unittest/_torch/pyexecutor/engine/test_nccl_window_model_call.py
Tests scope and request-ID behavior across peer modes, nested layers, and request counts. A failure-path test checks failed scope endings and a successful subsequent forward.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: Minimal · up to 17b9a

Merge Risk: ⚪ Minimal · up to 17b9a

The new tests are registered for CPU CI, and no merge-blocking defect was identified. Current-head runtime results remain pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows the required [None][type] format, clearly identifies a test change, and summarizes the NCCL scope and tensor ownership coverage.
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.
Description check Passed The description follows the repository template in substance. It has a Description section that explains the guard for peerless forwards and the ownership handling, and a Test Coverage section that na…
Full details: Description check

Explanation

The description follows the repository template in substance. It has a Description section that explains the guard for peerless forwards and the ownership handling, and a Test Coverage section that names the test files and reports CPU and GPU results. It also includes the PR checklist, with the single checkbox marked as reviewed. It does not follow the required title format in the description body, but the title is outside this description check. The author describes two CI runs with mixed outcomes and explains the earlier failures, so the merge state is documented. Some Test Coverage content is historical and tied to superseded head commits, which makes the current verification harder to follow. The description is long and detailed, but the required sections are present and substantive.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fee6cfd and 478282e.

Files selected for processing: 2

  • tests/unittest/_torch/pyexecutor/engine/test_nccl_window_model_call.py
  • tests/unittest/_torch/test_nccl_window_graph.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82223 [ run ] completed with state SUCCESS. Commit: 478282e
/LLM/main/L0_MergeRequest_PR pipeline #67850 completed with status: 'SUCCESS'

CI Report

Link to invocation

@ruodil

ruodil commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

Merge-readiness check (2026-11-06): current head 478282ef8776 passed L0 #67850, blossom-ci and DCO are green, all review threads are resolved, and GitHub reports no merge conflict. The existing CPU directory selector covers the model-call test; the graph test also has an explicit CPU-list entry.

Updated the description to replace superseded local-environment/CI-list uncertainty with the verified current result. GitHub still reports REVIEW_REQUIRED; @QiJune @asfiyab-nvidia, could you complete the pending Code Owner review? No source changes or additional CI rerun are needed for this head.

@ruodil

ruodil commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up (2026-11-18): unchanged head 478282ef8776 previously passed L0 #67850 on November 3. The fresh GitHub REST and GraphQL summaries no longer expose its blossom-ci, DCO or pre-commit results; the surviving PR metadata checks pass. Requesting one standard CI run to restore a current bot result. This is missing current check evidence, not a newly observed test failure. Existing Code Owner approval is still required.

@ruodil

ruodil commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@ruodil

ruodil commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Required-check follow-up: the original DCO and pre-commit check-run endpoints also return 404, and the main ruleset requires DCO from the original DCO integration. Pushed signed-off empty commit 17b9aa57fa93; its Git tree is identical to 478282ef8776. This triggers fresh GitHub checks without changing the tests. The earlier bot request was for the old head; requesting standard CI once for this new head. Existing Code Owner review remains required.

@ruodil

ruodil commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85606 [ run ] triggered by Bot. Commit: 17b9aa5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85612 [ run ] triggered by Bot. Commit: 17b9aa5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85606 [ run ] completed with state ABORTED. Commit: 17b9aa5

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85612 [ run ] completed with state SUCCESS. Commit: 17b9aa5
/LLM/main/L0_MergeRequest_PR pipeline #70873 completed with status: 'UNSTABLE'

CI Report

⚠️ 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

@ruodil

ruodil commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up (2026-11-19), unchanged head 17b9aa57fa93: inspected the L0 #70873 report and raw JUnit.

  • All 60 PR-specific CPU cases passed on both x86 and ARM (51 graph + 9 model-call cases per architecture, 120 passes total, no skips).
  • The 170 final failures are 90 H100 pyexecutor subcases with HostOOMError: mmap failed: Cannot allocate memory, 79 with CUDA error 201 / corrupted KV-cache manager, and one suite wrapper. None is in either changed test module. Superseded/retry JUnit copies are excluded.
  • These runtime/resource symptoms do not yet establish the underlying cause or prove an infrastructure-only issue. DCO/pre-commit pass; all review threads are resolved; merge-tree against current main is clean.

Updated the description with that evidence. Requesting one standard rerun on the unchanged head to test recurrence and restore a successful required check. No waiver or source change is made; Code Owner approval remains required.

@ruodil

ruodil commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85889 [ run ] triggered by Bot. Commit: 17b9aa5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #85889 [ run ] completed with state SUCCESS. Commit: 17b9aa5
/LLM/main/L0_MergeRequest_PR pipeline #71125 completed with status: 'SUCCESS'

CI Report

Link to invocation

This branch has not been deployed

No deployments
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