Skip to content

test(rccl): add host microtests for nccl_device/core.cc team helpers - #13316

Closed
aduforest wants to merge 6 commits into
developfrom
users/aduforest/aicomrccl-2825-core-host-microtests
Closed

aduforest wants to merge 6 commits into
developfrom
users/aduforest/aicomrccl-2825-core-host-microtests

Conversation

@aduforest

@aduforest aduforest commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

JIRA ID: AICOMRCCL-2825

What

Host-only microtests for src/nccl_device/core.cc: the ncclTeam* views and the world/LSA rank-translation helpers. Third PR in the AICOMRCCL-2825 stack.

How

New binary rccl-UnitTestsMicroCore (core-test.cc, suite CoreMicrotest.*), because rccl-UnitTestsMicro already fakes five of core.cc's seven functions. It links the hookable ncclDevrInitOnce in fakes/dev_runtime_fakes.cc, so both its success and failure paths are tested.

Registered like every other microtest binary: run_host_tests.sh, its own test_categories_micro_core.yaml, ci-precheckin.json, and the llvm-cov list in test_executor.py.

Coverage

7/7 functions, 55/55 lines, 32/32 regions, 16/16 branches.

Mutation Testing

7 mutations on the hipified source, all killed.

Test Plan

  • CoreMicrotest.*: 16/16, and 16/16 × 20 shuffled.
  • rccl-UnitTestsMicro on develop: 1903/1903.
  • Test-only change, plus registering the binary in ci-precheckin.json and test_executor.py.

🤖 Generated with Claude Code

@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus 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.

ARGUS

Bottom line: LGTM once TeamRail_SuccessPath uses constants that do not collide at nccl-core-test.cc:94.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/core-test.cc Resolved
Comment thread projects/rccl/test/host/CMakeLists.txt Resolved
Comment thread projects/rccl/test/host/core-test.cc Resolved
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@aduforest

Copy link
Copy Markdown
Member Author

@argus re-review

@amd-argus amd-argus 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.

ARGUS

Bottom line: LGTM once TeamRail_SuccessPath's rank constant is re-picked: 10 / 4 and 10 % 4 are both 2, so core.cc:76's division is unpinned.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2825-core-host-microtests branch from 33576d9 to bb3814c Compare October 13, 2026 18:00
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus 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.

ARGUS

Findings

1 finding(s) that could not be posted as inline comments
  • projects/rccl/test/host/MICROTEST_README.md:802 (Low) The README's two standalone-build binary lists still omit the new target The standalone-build binary list at MICROTEST_README.md:798-802 and the run block at MICROTEST_README.md:826-845 still omit rccl-UnitTestsMicroNcclDeviceCore, though CMakeLists.txt:1023 builds it on that path and both lists already carry rccl-UnitTestsMicroCe.

Bottom line: Looks approval ready; the remaining notes are all Low.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/core-test.cc Resolved
Comment thread projects/rccl/test/host/CMakeLists.txt Resolved
Comment thread projects/rccl/test/host/CMakeLists.txt Resolved
@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2825-core-host-microtests branch from bb3814c to fafd71e Compare October 13, 2026 19:05
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus

amd-argus Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@aduforest the new head (fafd71e1) doesn't change any file I'd review. Looks like a merge that didn't touch this PR's own content, so nothing has changed since my last pass above; push a real change and I'll take another look.

@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus 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.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest
aduforest marked this pull request as ready for review October 13, 2026 23:16
@aduforest
aduforest requested review from a team, dhanavikram and pvallem October 13, 2026 23:16
aduforest and others added 4 commits October 14, 2026 11:09
- TeamRail_SuccessPath: avoid lsaSize^2 == nRanks so dividing by lsaSize
  can't be mistaken for reading it back directly.
- HierMultimem/HierLsa mode tests: give the other mode's field a distinct
  non-zero value, so a swapped arm divides by a real (wrong) number
  instead of silently dividing by zero.
- TeamRankToLsa: add a negative-offset case.
- Fix header comment: 5 of 7 functions gate on ncclDevrInitOnce, not 6.
- Drop the nccl_device EXTRA_INCLUDES entry: verified empirically (binary
  still builds and all tests pass without it) that core.cc does not need
  it; the stated reason didn't match core.cc's own include spelling.
rank=10 with lsaSize=4 gives 2 for both 10/4 and 10%4, so core.cc's rank
division was unpinned. rank=9 keeps the expected 2 and makes % give 1.

Co-Authored-By: Claude <noreply@anthropic.com>
…wnership wording, explicit yaml pattern

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2825-core-host-microtests branch from 253c0b5 to 854da50 Compare October 14, 2026 18:27
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus 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.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

…tests

Shorten the MICROTEST_README entry, CMake comments and test-file comments
to the length the other host microtests use. Comment and doc changes only.

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

Give the binary its own test_categories_micro_<stem>.yaml and register it in
ci-precheckin.json and test_executor.py's llvm-cov list, as MICROTEST_README's
naming section requires, so the CI test runner and coverage pick it up. Rename to core-test.cc / rccl-UnitTestsMicroCore / CoreMicrotest per the rules.

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

1 similar comment
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus 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.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest

Copy link
Copy Markdown
Member Author

Folded into #13312 (one PR per Jira ticket, so AICOMRCCL-2825 runs CI once). Same commits, unchanged.

@aduforest aduforest closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants