nemo-mbridge-perf-cuda-graphs

nemo-mbridge-perf-cuda-graphs is a skill for Claude Code from NVIDIA-NeMo/Megatron-Bridge. It costs 57 tokens per session (3,718 once invoked), scanned A, a copy of nemo-mbridge-perf-cuda-graphs, Apache-2.0.

A guide for capturing GPU work in CUDA graphs so it can be replayed with less CPU-side launch overhead in Megatron Bridge, a system for training large language models.

In plain words
What is it for?
Use it to profile workloads, test full-iteration or selected Transformer Engine graphs, verify replay timings, and investigate regressions or failures.
Why use it?
It helps determine whether CUDA graphs improve performance and provides checks for comparing them with normal execution.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/performance/run_script.py \.

Good fit Use it to profile workloads, test full-iteration or selected Transformer Engine graphs, verify replay timings, and investigate regressions or failures.

Compare 6 skills from other repositories ↓
About the project

Megatron Bridge is a library for training Megatron-based models and converting their checkpoints between Hugging Face and Megatron formats. Model developers use it for pretraining, supervised fine-tuning, long-context work, LoRA, inference, and image-and-text workflows supported by its examples and model configurations. The catalogue entries provide agent workflows and instructions for using the library.

NVIDIA-NeMo/Megatron-Bridge · 1,012 stars · on GitHub · docs.nvidia.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/NVIDIA-NeMo/Megatron-Bridge
agentmods
npx agentmods add skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nemo-mbridge-perf-cuda-graphs

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs/github.svg)](https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs)
Your own site
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nemo-mbridge-perf-cuda-graphs

Your own site · 80×15
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 13
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • medium Agent Snooping · line 316
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.03718
Opus 5.5 $0.00023 $0.01487
Sonnet 5.5 $0.00011 $0.00744
Haiku 4.5 $0.00006 $0.00372

Measured 2mo ago against content hash 13f73053fa14, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nemo-mbridge-perf-cuda-graphs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to nemo-mbridge-perf-cuda-graphs — 26 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/nemo-mbridge-perf-cuda-graphs/SKILL.md · 357 lines

How it starts

The opening of the file, as written. The whole thing — 357 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CUDA Graphs

Stable documentation: @docs/training/cuda-graphs.md Card: @skills/nemo-mbridge-perf-cuda-graphs/card.yaml

What It Is

CUDA graphs capture GPU operations once and replay them with minimal host-driver overhead. Bridge supports two implementations:

cuda_graph_impl Mechanism Scope support
"local" MCore FullCudaGraphWrapper wrapping entire fwd+bwd full_iteration
"transformer_engine" TE make_graphed_callables() per layer attn, mlp, moe, moe_router, moe_preprocess, mamba

Quick Decision

First confirm a profile shows material host/launch gaps. Then test the narrowest TE-scoped graph candidate and verify replay timing against eager on the same dispatcher, layout, routing, precision, and container:

  • dense models: attn, then optionally mlp
  • dropless MoE: moe_router moe_preprocess, then optionally attn
  • VLMs: the same dropless-MoE scope, but only after the real-data path is stable

Use local + full_iteration only when you specifically want full-iteration capture and can satisfy the tighter constraints.

For recompute-heavy workloads:

  • TE-scoped graphs pair naturally with selective recompute
  • full recompute usually pushes you toward local full-iteration graphs or away from graphs entirely

Related docs:

  • @docs/training/cuda-graphs.md
  • @docs/training/activation-recomputation.md

Enablement

Local full-iteration graph

cfg.model.cuda_graph_impl = "local"
cfg.model.cuda_graph_scope = ["full_iteration"]
cfg.model.cuda_graph_warmup_steps = 3
cfg.model.use_te_rng_tracker = True
cfg.rng.te_rng_tracker = True
cfg.rerun_state_machine.check_for_nan_in_loss = False
cfg.ddp.check_for_nan_in_grad = False

TE scoped graph (dense model)

cfg.model.cuda_graph_impl = "transformer_engine"
cfg.model.cuda_graph_scope = ["attn"]           # or ["attn", "mlp"]
cfg.model.cuda_graph_warmup_steps = 3
cfg.model.use_te_rng_tracker = True
cfg.rng.te_rng_tracker = True

Read the full file on GitHub · 357 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -2 lines scan C → A 13f73053fa14
  2. 3mo ago First seen · 359 lines · 57 tokens per session scan C 3eb297f3d421

Subscribe to this mod's changes

nemo-mbridge-perf-cuda-graphs is a skill published in the GitHub repository NVIDIA-NeMo/Megatron-Bridge (1,012 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 3,718 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to nemo-mbridge-perf-cuda-graphs, differing in 26 lines, and is treated as a copy.

Related

nemo-mbridge-perf-cuda-graphs compared with skills from other repositories

nemo-mbridge-perf-cuda-graphs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nemo-mbridge-perf-cuda-graphsNVIDIA-NeMo/Megatron-BridgeSkill1.0ktodayApache-2.0A57Claude Code
debug-inferenceNVIDIA/OpenShellSkill22kyesterdayApache-2.0A120Claude Code, Codex
notebooklmteng-lin/notebooklm-pySkill20ktodayMITA79Claude Code, Codex
oh-my-poshJanDeDobbeleer/oh-my-poshSkill24k4d agoMITA47Claude Code, Codex
spark-engineerJeffallan/claude-skillsSkill13ktodayMITA75Claude Code
autorag-doctorMarker-Inc-Korea/AutoRAGSkill6.2ktodayApache-2.0A144Claude Code, Codex
rocketride-debugging-pipelinesrocketride-org/rocketride-serverSkill20ktodayMITA67Claude Code