-
Notifications
You must be signed in to change notification settings - Fork 23
Add reduce_scatter and All_gather benchmark #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xiaohuguo2023
wants to merge
15
commits into
ROCm:main
Choose a base branch
from
xiaohuguo2023:rs_rms_ag
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1e33ba1
add example for RS+rmsnorm+f8quant+AG
xiaohuguo2023 2ec746c
Apply Ruff auto-fixes
github-actions[bot] 149b07c
add torch algorithm ref implementation
xiaohuguo2023 55bb735
Apply Ruff auto-fixes
github-actions[bot] ca9cd76
add reduce_scater kernel and benchmark script
xiaohuguo2023 cdb005a
new updates for tuning
xiaohuguo2023 c590c7a
fix reduce_scatter by use iris.load instead
xiaohuguo2023 f1e07b2
tidy up and correct interconnect bw calculation
xiaohuguo2023 0f496f8
remove rmsnorm_block_size as input, add estimated heap_size and tidy up
xiaohuguo2023 6d4434b
add kwargs
xiaohuguo2023 f030a87
tidy up
xiaohuguo2023 8734481
change directory name
xiaohuguo2023 ccdeb00
add README
xiaohuguo2023 43127db
remove and tidy up
xiaohuguo2023 955bc24
format files with ruff
xiaohuguo2023 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <!-- | ||
| SPDX-License-Identifier: MIT | ||
| Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. | ||
| --> | ||
|
|
||
| # Reduce-Scatter → RMSNorm → FP8 Quantization → All-Gather benchmark using Iris | ||
| This example implements a complete tensor processing pipeline across multiple GPUs: | ||
|
|
||
| 1. **Reduce-Scatter**: Sum tensors across all GPUs and distribute shards | ||
| 2. **RMSNorm**: Apply Root Mean Square normalization to each shard | ||
| 3. **FP8 Quantization**: Quantize to 8-bit floating point (optional) 4. **All-Gather**: Reconstruct the full tensor across all GPUs (optional) | ||
|
|
||
| ## Usage | ||
|
|
||
| ```terminal | ||
| python benchmark.py --num_rows 8192 --num_cols 7168 --num_ranks 8 --benchmark --fp8_out --all_gather --BLOCK_M 16 --BLOCK_N 64 --num_warps 16 --num_stages 4 --waves_per_eu 4 --rmsnorm_block_size 1024 --rmsnorm_num_warps 8 --rmsnorm_num_prgms 1024 --rmsnorm_waves_per_eu 2 --fp8_block_m 64 --fp8_block_n 64 --fp8_num_warps 4 --fp8_num_stages 2 --fp8_waves_per_eu 2 --ag_block_m 64 --ag_block_n 64 --ag_num_warps 8 --ag_num_stages 3 --ag_waves_per_eu 2 --validate | ||
| ``` | ||
|
|
||
| The benchmark measures the bandwidth of each GPU receiving data from all other GPUs. Each GPU performs a load operation from every other GPU in the system, and the total bandwidth is calculated based on the total amount of data received and the time taken. | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 11 contains a formatting issue where item 4 runs onto the same line as item 3 without a line break. This should be split into separate lines for proper markdown list formatting.