perf-tp-dp-comm-overlap

Configure Megatron-Bridge communication overlap for tensor, data, and pipeline parallelism.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill perf-tp-dp-comm-overlap-yo-steven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-tp-dp-comm-overlap
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/Megatron-Bridge/perf-tp-dp-comm-overlap
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill perf-tp-dp-comm-overlap-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Communication overlap configuration is often the difference between steady throughput and a sudden regression, because TP/DP/PP pipelines depend on specific gating conditions and runtime choices inside Megatron-Bridge.

Core Features & Use Cases

  • Enables TP communication overlap: Turns on tensor-parallel comm overlap when the required gating conditions are met, including sequence parallelism and TE availability.
  • Enables DP comm overlap on distributed optimizer paths: Sets distributed optimizer modes and overlaps gradient reduce and parameter gather behavior for higher utilization.
  • Selects PP overlap behavior correctly: Applies the PP overlap configuration logic that depends on pipeline parallel and virtual pipeline sizes, including p2p vs batch behavior.
  • Provides code anchors and pitfalls: Points directly to the relevant Megatron-Bridge implementation sections and highlights common misconfigurations that silently disable overlap.
  • Verification-focused: Uses the repository’s checked-in unit tests to confirm the expected overlap logic before running expensive benchmarks.

Quick Start

Use the Megatron-Bridge CommOverlapConfig snippet to set tp_comm_overlap=True plus ddp distributed-optimizer overlap flags, then validate with the provided unit test commands.

Frequently Asked Questions about perf-tp-dp-comm-overlap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I overlap tensor parallel and data parallel communication in Megatron-Bridge?

To overlap tensor and data parallel communication in Megatron-Bridge, enable the tp_comm_overlap flag and set the distributed optimizer overlap fields within the CommOverlapConfig to avoid throughput regressions.

Why does my training throughput drop when using sequence parallelism with Megatron-Bridge?

Throughput drops when sequence parallelism is enabled because tensor-parallel communication overlap requires specific gating conditions, including Transformer Engine availability, which must be explicitly configured in Megatron-Bridge.

How do I validate communication overlap behavior before running expensive benchmarks?

Validate communication overlap behavior by running the repository's checked-in unit tests to confirm the expected overlap logic, ensuring your CommOverlapConfig settings work correctly before executing expensive benchmarks.

Does pipeline parallel communication overlap depend on virtual pipeline sizes?

Yes, pipeline parallel communication overlap depends on pipeline parallel and virtual pipeline sizes, requiring specific p2p versus batch behavior configurations to correctly apply the overlap logic in Megatron-Bridge.

What common misconfigurations silently disable TP and DP communication overlap?

Common misconfigurations that silently disable communication overlap include setting incompatible parallelism sizes, missing sequence parallelism requirements, and failing to set the correct distributed optimizer modes for gradient reduce and parameter gather.