Skip to content

Add unit tests for hierarchical all_reduce and all_gather#7189

Merged
hkaiser merged 3 commits intoTheHPXProject:masterfrom
iemAnshuman:feature/hierarchical-tests
Apr 16, 2026
Merged

Add unit tests for hierarchical all_reduce and all_gather#7189
hkaiser merged 3 commits intoTheHPXProject:masterfrom
iemAnshuman:feature/hierarchical-tests

Conversation

@iemAnshuman
Copy link
Copy Markdown
Contributor

Tests verify correctness of the reduce+broadcast and gather+broadcast compositions at varying site counts (2-64) and arities (2, 4, 8, 16). Both local (single-locality, multi-threaded) and distributed (multi-locality) configurations are covered.

Follows the same pattern as the existing reduce_hierarchical, gather_hierarchical, broadcast_hierarchical, and scatter_hierarchical tests.

Companion to #7160 which added the hierarchical all_reduce and all_gather implementations.

Proposed Changes

  • Add all_reduce_hierarchical.cpp unit test
  • Add all_gather_hierarchical.cpp unit test
  • Register both in CMakeLists.txt under the networking test suite

Any background context you want to provide?

The hierarchical all_reduce and all_gather were merged in #7160 but without dedicated unit tests. These tests fill that gap.

Checklist

  • I have added a new feature and have added tests to go along with it.

Tests verify correctness of the reduce+broadcast and gather+broadcast
compositions at varying site counts (2-64) and arities (2, 4, 8, 16).
Both local (single-locality, multi-threaded) and distributed
(multi-locality) configurations are covered.
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 15, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@StellarBot
Copy link
Copy Markdown

Can one of the admins verify this patch?

Comment thread libs/full/collectives/tests/unit/CMakeLists.txt Outdated
@iemAnshuman
Copy link
Copy Markdown
Contributor Author

@hkaiser CMakeLists sorting fixed per your review. All CI green. Ready for re-review.

Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hkaiser hkaiser added this to the 2.0.0 milestone Apr 16, 2026
@hkaiser hkaiser merged commit 87f1c3f into TheHPXProject:master Apr 16, 2026
65 checks passed
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.

3 participants