Skip to content

Commit 91d60f3

Browse files
committed
chore(skills): test NVSkills auto request
Signed-off-by: Chen Cui <chcui@nvidia.com>
1 parent ea59673 commit 91d60f3

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

‎skills/nemo-mbridge-perf-cuda-graphs/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ when_to_use: Reducing host-driver overhead via CUDA graphs, or tracing a crash o
77

88
# CUDA Graphs
99

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

1313
## What It Is
Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
1-
[]
1+
[
2+
{
3+
"id": "cuda-graphs-te-scoped-moe-smoke",
4+
"question": "I am training a Megatron Bridge Qwen3 MoE model and want to reduce CPU launch overhead with CUDA graphs. Which cuda_graph_impl and cuda_graph_scope should I start with, and what prerequisites should I set?",
5+
"expected_skill": "nemo-mbridge-perf-cuda-graphs",
6+
"expected_script": null,
7+
"ground_truth": "For most Megatron Bridge training workloads, start with Transformer Engine scoped graphs rather than local full-iteration capture. For a dropless MoE model, use cuda_graph_impl=\"transformer_engine\" with cuda_graph_scope including attn, moe_router, and moe_preprocess. Set cuda_graph_warmup_steps, enable model.use_te_rng_tracker and rng.te_rng_tracker, keep sequence length and micro-batch size static, and compare steady-state replay iterations after warmup and capture. Do not combine moe and moe_router scopes.",
8+
"expected_behavior": [
9+
"Read the nemo-mbridge-perf-cuda-graphs skill before answering.",
10+
"Recommend transformer_engine scoped graphs for the MoE bring-up path.",
11+
"Name the relevant MoE scopes: attn, moe_router, and moe_preprocess.",
12+
"Mention the TE RNG tracker requirement and static-shape constraint.",
13+
"Tell the user to compare replay timing after warmup and capture rather than measuring the capture step."
14+
]
15+
},
16+
{
17+
"id": "cuda-graphs-local-full-iteration-constraints",
18+
"question": "My Megatron Bridge run uses cuda_graph_impl=\"local\" with cuda_graph_scope=[\"full_iteration\"], but it fails around runtime checks. What configuration constraints should I verify?",
19+
"expected_skill": "nemo-mbridge-perf-cuda-graphs",
20+
"expected_script": null,
21+
"ground_truth": "Local full-iteration CUDA graphs are only valid with the full_iteration scope and have tighter constraints than TE scoped graphs. Verify rerun_state_machine.check_for_nan_in_loss is false, enable model.use_te_rng_tracker and rng.te_rng_tracker, keep tensor shapes static, and avoid incompatible features such as CPU offloading. If PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True is set, NCCL_GRAPH_REGISTER may need to be set to 0. The user should first stabilize the eager run and then enable the narrowest useful graph path.",
22+
"expected_behavior": [
23+
"Read the nemo-mbridge-perf-cuda-graphs skill before answering.",
24+
"Identify that local full-iteration graphs require the full_iteration scope.",
25+
"Mention that check_for_nan_in_loss must be disabled for local full_iteration graphs.",
26+
"Mention TE RNG tracker and static tensor shape requirements.",
27+
"Call out at least one incompatible or environment-sensitive setting such as CPU offloading or NCCL_GRAPH_REGISTER."
28+
]
29+
},
30+
{
31+
"id": "cuda-graphs-negative-model-support",
32+
"question": "How do I add a new Hugging Face model family to Megatron Bridge and wire its config mapping?",
33+
"expected_skill": null,
34+
"expected_script": null,
35+
"ground_truth": "This prompt is about adding model support and configuration mapping, not validating or configuring CUDA graph capture. The CUDA graphs skill should not be selected.",
36+
"expected_behavior": [
37+
"Do not select the nemo-mbridge-perf-cuda-graphs skill.",
38+
"Do not answer with CUDA graph implementation or scope guidance.",
39+
"Route the task to model-support guidance or ask for the relevant model-support context instead."
40+
]
41+
}
42+
]

0 commit comments

Comments
 (0)