nemo-mbridge-perf-tp-dp-comm-overlap
Operational guide for enabling TP, DP, and PP communication overlap in Megatron-Bridge, including config knobs, code anchors, pitfalls, and verification.
Security Assessment
About nemo-mbridge-perf-tp-dp-comm-overlap
nemo-mbridge-perf-tp-dp-comm-overlap is an NVIDIA operational guide for enabling tensor-parallel (TP), data-parallel (DP), and pipeline-parallel (PP) communication overlap in Megatron-Bridge. It solves a common distributed-training performance problem: overlapping communication with computation to reduce idle time, and tracing throughput regressions back to a comm-overlap config change. It provides a minimal Bridge override that wires up TP comm overlap with sequence parallelism, distributed optimizer, and grad-reduce/param-gather overlap, plus an optional user-buffers TP preset and the correct placement of precision knobs under mixed precision.
The skill includes code anchors into Bridge source for the overlap gating logic, PP overlap selection (auto-selecting overlap_p2p_comm only when PP>1 and VPP>1), DP overlap defaults, and launch-time environment tuning such as CUDA_DEVICE_MAX_CONNECTIONS and LayerNorm SM margin. A pitfalls section warns about non-obvious behavior: TP overlap silently disabling itself without sequence parallel or Transformer Engine, bucket_size being a parameter-count rather than byte-size knob, and precision/env settings belonging to mixed precision or launch plugins rather than CommOverlapConfig. Verification is done through checked-in unit tests with explicit pass counts (26 passed).
It targets performance and infrastructure engineers tuning large-model training throughput on Megatron-Bridge. The output is configuration instructions plus pytest verification commands — no destructive operations, credential handling, or network exfiltration. NVSkills-Eval reported a 100% Security score.
FAQ
What does the minimal enablement look like?
Set TP/SP/PP sizes, construct CommOverlapConfig(tp_comm_overlap=True), and enable use_distributed_optimizer, overlap_grad_reduce, and overlap_param_gather on ddp.
Why might TP overlap not take effect?
TP overlap silently disables itself if sequence_parallel is False, tensor_model_parallel_size is below 2, or Transformer Engine is unavailable.
How is PP overlap selected?
Bridge only auto-selects overlap_p2p_comm=True when PP>1 and virtual pipeline parallel (VPP)>1; otherwise it uses batch_p2p_comm.
How do I verify the configuration?
Run the checked-in overlap unit tests (pytest on test_comm_overlap.py), expecting 26 passed, and optionally the run-plugins tests if nemo_run is available.
Where do precision and env settings belong?
grad_reduce_in_fp32 and fp8_param_gather belong to mixed precision, and CUDA_DEVICE_MAX_CONNECTIONS and LayerNorm SM margin are launch-time plugin settings, not CommOverlapConfig fields.
Install nemo-mbridge-perf-tp-dp-comm-overlap
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nvidia/skills