Dev & Engineering ✓ NVIDIA · Official cuda-graphsmegatron-bridgetransformer-enginedistributed-trainingmixture-of-expertsgpu-performance

NeMo MBridge CUDA Graphs

Configure, validate, and benchmark CUDA Graph capture in Megatron Bridge to reduce host-driver overhead.

FollowSkills review · FSRS-2.0
Not recommended
55/ 100 5-point scale 2.8 / 5
Trust16 / 25 · 3.2/5

The skill discloses static-shape, memory, NCCL environment, CPU-offloading, recomputation, MoE-scope, and packed-sequence risks, and recommends graph cleanup and benchmark comparison. No malware, credential handling, covert exfiltration, or excessive access is evident. Points are deducted because explicit user confirmation, general rollback guidance, and recovery procedures are incomplete; the local full-iteration path also requires disabling NaN checks, leaving important safety decisions to the operator.

Reliability9 / 20 · 2.3/5

The guidance is internally coherent and includes configuration constraints, code anchors, failure modes, and test commands, while distinguishing capture from replay timing. Points are deducted because this review is static and the tests and functional smoke test were not executed; the workflow depends on complex Megatron-Core, Transformer Engine, container, GPU-architecture, and backend combinations, with some abnormal paths reduced to assertions or brief fixes. Static calibration limits this score to 10 or below.

Adaptability10 / 15 · 3.3/5

The audience, CUDA graph implementations, scopes, MoE and dense scenarios, fit conditions, and non-fit conditions are reasonably clear. The core function does not depend on an overseas online service, so no mainland-China reachability deduction is required. Points are deducted because the material is English-only, offers no Chinese-language support, and leaves some version, container, hardware, and semantic-trigger boundaries underspecified.

Convention9 / 15 · 3.0/5

The SKILL.md has useful progressive structure covering decisions, enablement examples, constraints, code anchors, pitfalls, and verification, with supporting card, benchmark, evaluation, version, license, and publication-workflow material. Points are deducted because the benchmark reports missing recommended Instructions and Examples sections, author metadata is absent, changelog and explicit maintenance/update ownership are incomplete, and the stated license metadata is NOASSERTION despite Apache-2.0 declarations elsewhere.

Effectiveness7 / 15 · 2.3/5

The skill provides directly usable Megatron Bridge CUDA graph configurations for dense, MoE, full-iteration, and TE-scoped paths, plus steady-state timing guidance. Attached files document successful, neutral/slower, blocked, and OOM cases. Points are deducted because benefits are workload-dependent, some performance evidence cannot be reproduced during this static review, and operators still need manual validation against the target container, GPU, dispatcher, and memory headroom. Static calibration caps this at 7.

Verifiability4 / 10 · 2.0/5

The files include source-code line anchors, training-loop references, MCore class names, test paths, evaluation records, and measured results, providing useful audit trails. They also acknowledge unexecuted end-to-end tests, inconclusive loss comparisons, and follow-up validation. Points are deducted because no independently reproducible execution was performed here, and corroboration relies mainly on attached reports and code references. Static calibration caps this at 5.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 55f18499943e
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Do not treat the reported 15–25% step-time or 20–33% throughput gains as guaranteed; remeasure after warmup and capture on the target GPU, container, dispatcher, batch shape, and memory configuration.
  • local plus full_iteration disables loss-NaN checking and pins intermediate graph buffers; confirm monitoring, memory headroom, and abort/cleanup procedures before adoption.
  • TE-scoped graphs may fail with packed sequences, full recompute, CPU offloading, dynamic sequence lengths, or missing Transformer Engine attention backends.
See the full review method →

What does this skill do, and when should you use it?

This skill targets engineers training large models with NeMo MBridge and Megatron Bridge who need practical CUDA Graph guidance. It covers MCore local full-iteration graphs and Transformer Engine scoped graphs for attention, MLP, and MoE-related modules. The instructions provide configuration examples, performance-harness commands, implementation anchors, constraints, pitfalls, and unit and GPU smoke tests. It is a good fit for graph bring-up and regression tracing, but successful capture is not evidence of a speedup by itself.

Shows how to set cuda_graph_impl, cuda_graph_scope, warmup steps, and the Transformer Engine RNG tracker; runs training through the performance harness; explains capture for local full_iteration and transformer_engine scoped graphs; checks static tensor shapes, MoE scope rules, recompute, delayed weight-gradient, CPU offloading, and NCCL graph-registration constraints; runs pytest coverage for CUDA Graph configuration and communication-overlap behavior plus a GPU-dependent functional smoke test; and compares post-warmup eager iterations with graph replay iterations.

  1. A dense-model training engineer wants to graph attention first and optionally MLP with Transformer Engine scoped graphs.
  2. A dropless-MoE training engineer needs to configure attn, moe_router, and moe_preprocess scopes.
  3. An engineer is tracing a crash, assertion, or performance regression after changing CUDA Graph configuration.
  4. A training team using selective recompute wants to evaluate its interaction with Transformer Engine scoped graphs.
  5. A team specifically needs full forward-and-backward iteration capture and can satisfy the tighter local-graph constraints.

What are this skill's strengths and limitations?

Pros
  • Covers both local full_iteration graphs and Transformer Engine scoped graphs.
  • Includes copyable Python configuration, performance-harness CLI, and pytest commands.
  • Documents important constraints involving RNG tracking, static shapes, MoE, recompute, CPU offloading, and NCCL registration.
  • Provides code anchors, positive recipe locations, and graph-cleanup guidance for implementation-level debugging.
Limitations
  • CUDA Graphs pin intermediate buffers and can materially increase memory use; full-iteration graphs may raise peak memory by 1.5–2×.
  • Variable-length sequences, CPU offloading, and several MoE or recompute combinations are incompatible.
  • The functional smoke test requires a GPU, and the source does not provide a complete cross-platform test matrix.
  • The documented capture case replayed slightly slower than eager, so capture success does not guarantee a performance gain.

How do you install this skill?

Install the individual skill with the NVIDIA skills CLI:

npx skills add nvidia/skills --skill nemo-mbridge-perf-cuda-graphs --yes

The README does not document a fixed per-client installation directory; the CLI prompts for or manages the destination.

How do you use this skill?

Ask an Agent with the skill loaded for a Megatron Bridge CUDA Graph configuration or validation task, for example: “Configure Transformer Engine CUDA Graphs for my Megatron Bridge dropless-MoE training and validate replay performance after warmup.” Choose scopes based on the model, stabilize eager execution first, fix sequence length and micro-batch size, then compare captured replay iterations with an eager baseline.

How does this skill compare with similar options?

The skill explicitly compares eager execution with CUDA Graph replay and contrasts local full-iteration graphs with Transformer Engine scoped graphs. It recommends starting with TE scoped graphs for most workloads, reserving local full_iteration for cases that specifically need full-iteration capture and can satisfy its stricter constraints.

FAQ

Is this suitable for every training workload?
No. It is aimed at Megatron Bridge workloads where host-driver overhead is visible, tensor shapes are static, and the CUDA Graph constraints can be met.
Will CUDA Graphs always make training faster?
No. The skill requires comparing replay iterations after warmup and capture with an eager baseline using the same dispatcher, layout, and container.
Why might CUDA Graph configuration trigger an assertion?
Typical causes include missing use_te_rng_tracker or rng.te_rng_tracker, leaving loss-NaN checks enabled for full_iteration, invalid scope combinations, CPU offloading, or recompute settings unsupported by TE scoped graphs.
What validation environment is required?
The unit commands require uv, Python, and pytest. The functional test explicitly requires a GPU, and success includes completing training steps without NCCL errors or illegal memory access.

More skills from this repository

All from NVIDIA/skills

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Performance Workflow

Systematically diagnose and improve MoE training throughput in Megatron Bridge.

Dev & Engineering ✓ NVIDIA · Official

Megatron Bridge Activation Recompute

Trade extra compute for lower GPU activation memory in Megatron Bridge training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Communication Overlap

Tune expert-parallel communication and computation overlap in Megatron Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Hierarchical Context Parallelism

Enable, troubleshoot, and verify hierarchical context parallelism in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Long-Context MoE Training

Practical Megatron Bridge guidance for sizing parallelism, managing memory, and preserving throughput in long-context MoE training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge GPU Memory Tuning

Diagnose GPU OOMs in Megatron Bridge training and reduce fragmentation, activation, and PEFT memory usage.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE VLM Training Guide

Guides FSDP and 3D-parallel choices and tuning for MoE vision-language model training.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge CPU Offload

Configure, validate, and troubleshoot CPU offloading in Megatron Bridge to relieve GPU memory pressure.

Dev & Engineering ✓ NVIDIA · Official

Megatron FSDP Configuration and Performance Guide

Enable, troubleshoot, and verify Megatron FSDP in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Recipe Recommender

Recommends adjustable Megatron Bridge recipes for your model, GPU budget, and training goal.

Dev & Engineering ✓ NVIDIA · Official

MoE Dispatcher Selection Guide

Choose alltoall, DeepEP, or HybridEP from the hardware, expert-parallel degree, and optimization stage.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Training Guide

Run Megatron-LM and Megatron Bridge training and verify whether their loss curves match.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Parallelism Strategy Guide

Choose, combine, and validate Megatron Bridge parallelism configurations.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge MoE Expert-Parallel Overlap

Configure, validate, and troubleshoot MoE expert-parallel communication overlap in Megatron-Bridge.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Training Resiliency

Configure fault recovery and hang detection for Megatron Bridge distributed training.

Dev & Engineering ✓ NVIDIA · Official

Megatron-Bridge Communication Overlap Guide

Configure and verify TP, DP, and PP communication overlap in Megatron-Bridge training.

Automation & Ops ✓ NVIDIA · Official

Megatron-LM on SLURM

Launch, monitor, and troubleshoot multi-node Megatron-LM training on SLURM GPU clusters.

Dev & Engineering ✓ NVIDIA · Official

MoE Hardware Configuration Reference

Plan MoE training layouts and throughput expectations across NVIDIA GPU platforms.

Dev & Engineering ✓ NVIDIA · Official

NeMo AutoModel Model Onboarding

A structured guide for adding new LLM, MoE, and VLM architectures to NeMo AutoModel.

Dev & Engineering ✓ NVIDIA · Official

NeMo MBridge Sequence Packing

Configure and validate sequence packing and long-context training in Megatron-Bridge.

Related skills