Address perf issue for allgather_fullmesh_2 - #884
Open
Binyang Li (Binyang2014) wants to merge 8 commits into
Open
Address perf issue for allgather_fullmesh_2#884Binyang Li (Binyang2014) wants to merge 8 commits into
Binyang Li (Binyang2014) wants to merge 8 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Optimizes out-of-place full-mesh allgather and makes tuning configurations dtype-aware.
Changes:
- Distributes local allgather copies across warps.
- Keys tuning entries by data and accumulation types.
- Adds BF16 benchmark selection.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/ext/collectives/allgather/allgather_fullmesh_2.cu |
Rebalances local-copy work. |
python/mscclpp_benchmark/tuning_config.py |
Adds dtype-aware configuration storage. |
python/mscclpp_benchmark/comm.py |
Selects configurations by dtype. |
python/mscclpp_benchmark/bench_collective.py |
Records typed tuning results and adds BF16. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Encode BF16 raw storage correctly and normalize tuning accumulation defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 261c58af-1f7f-42cb-a4bf-3e878b5890f3
Require exact comparison for non-reduction collectives and clarify local-copy warp sizing names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 261c58af-1f7f-42cb-a4bf-3e878b5890f3
Combine benchmark correctness and tuning config coverage in one test module. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 261c58af-1f7f-42cb-a4bf-3e878b5890f3
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
python/mscclpp_benchmark/tuning_config.py:226
- Entries loaded from JSON do not apply the same
accum = dtypedefault asselect()andupsert(). A hand-authored entry such as{ "dtype": "float16" }is stored as(float16, None), while every normal lookup defaults to(float16, float16), so the entry can never be selected. Default a missingaccumto the parsed dtype during deserialization as well.
dtype=None if raw_entry.get("dtype") is None else str(raw_entry["dtype"]),
accum=None if raw_entry.get("accum") is None else str(raw_entry["accum"]),
Comment on lines
+180
to
+183
| if accum_dtype == _mscclpp().DataType.float16: | ||
| return "float16" | ||
| if accum_dtype == _mscclpp().DataType.float32: | ||
| return "float32" |
| from mscclpp_benchmark.tuning_config import HardwareProfile, TunedConfig, TunedConfigStore | ||
|
|
||
|
|
||
| def test_allgather_requires_exact_match(): |
Binyang Li (Binyang2014)
marked this pull request as ready for review
August 25, 2026 22:45
Reject unsupported mixed accumulation and run benchmark support tests in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 261c58af-1f7f-42cb-a4bf-3e878b5890f3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
default_allgather_fullmesh2.test_benchmark.py.Motivation
In out-of-place allgather, every peer channel references the same local output buffer. The previous kernel copied each local chunk once per peer, resulting in seven redundant local writes on an 8-GPU system.
The motivating configuration showed a large latency gap between 49,504 B and 51,200 B messages.
Implementation
Remote transfers retain the existing full-mesh mapping:
Local copies use an independent offset so each local output region is written only once:
localOffset = gWid * localCopyBytesPerWarp;Tail copies are bounded by the remaining message size.
The benchmark updates also:
uint16storage correctly.Performance
Measured on 8x MI300X using BF16 out-of-place allgather:
The 49,504/51,200 B gap is reduced to approximately 0.4%.
Validation
mscclpp_collectivessuccessfully../tools/lint.sh.