Add periodic GPU sniff tests to detect hardware stragglers - #4662
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
f06fc00 to
ff841df
Compare
ff841df to
5cc82c0
Compare
5cc82c0 to
cabbf64
Compare
cabbf64 to
fc37c4f
Compare
| tp = args.tensor_model_parallel_size | ||
| gated = getattr(args, 'gated_linear_unit', False) or getattr(args, 'swiglu', False) | ||
|
|
||
| tokens = args.micro_batch_size * args.seq_length |
There was a problem hiding this comment.
Should we consider CP here too?
There was a problem hiding this comment.
Let's see how well this does first. We can do CP later, but cross-node issues should be caught by the DP tests.
| # Send/recv benchmark. | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
| def bench_sendrecv(group): |
There was a problem hiding this comment.
Should we protect this test when DP size is not a power of 2? Or switch to a ring based grouping?
There was a problem hiding this comment.
The only problem with non-powers of 2 is some ranks might not participate in this send-recv pair. Will remove these from the report.
fc37c4f to
f6c873f
Compare
f6c873f to
e939149
Compare
e939149 to
e7ab9e7
Compare
|
/ok to test 0beca0e |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/25529908995 |
0beca0e to
e41ac4c
Compare
Add a lightweight GPU benchmarking module that can be run periodically during training (controlled by --gpu-sniff-test-interval) or standalone. Three micro-benchmarks are run and metrics are gathered across all ranks: 1. GEMMs (standard shapes + FFN shapes from training args). 2. All-to-all over EP process group. 3. Pairwise send/recv at multiple strides within DP process group. Any rank whose throughput deviates from the mean by more than one standard deviation (and more than 10% of the mean) is flagged as an outlier. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e41ac4c to
bab057d
Compare
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/25535780334 |
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: yhgalaxy <yhgalaxy@outlook.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Jon Barker <jbarker@aws-cmh-slurm-1-vscode-02.cm.cluster>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Dmytro Pykhtar <dpykhtar@nvidia.com>
Summary
Add periodic GPU performance sniff tests to detect hardware degradation and stragglers during training. We will push all the collected data to a metrics service in a follow-up PR.
Motivation
Large-scale training runs are vulnerable to silent GPU/network degradation — a single slow node can bottleneck the entire job. This feature provides lightweight, periodic micro-benchmarks that flag outlier ranks by name and node, making it easy to identify and replace bad hardware without waiting for training throughput to visibly drop.
What it does
megatron/training/gpu_sniff_test.pywith five micro-benchmarks, each run at two message sizes (256 MiB and 1 MiB):--gpu-sniff-test-interval N: runs once before training starts and every N iterations thereafter.ProcessGroupCollectionto avoid relying on global parallel state.Sample output (standalone, 16 nodes / 128x H100, EP=8, TP=4)
Sample output (integrated, 4 nodes / 32x H100, 8B model, TP=4)
Standalone usage
Test plan
🤖 Generated with Claude Code