npx skills add ...
npx skills add nvidia/megatron-lm --skill mcore-cicd
CI/CD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request/BRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.
npx skills add nvidia/megatron-lm --skill mcore-cicd
For PR-label or trigger questions, lead with the exact values:
scope=mr-github-slim, n_repeat=2, lightweight=false.container::lts only switches the container image path to LTS and combines
with any scope label. Opt-in only — attach it solely when the user
explicitly asks for LTS validation; never add it on your own initiative, even
for a container or dependency change.Run MBridge tests additionally triggers the MBridge L1 suite.Run NeMoRL tests additionally triggers NeMo RL's Megatron functional test suite.tools/trigger_internal_ci.py
force-pushes the current branch to the internal GitLab remote as
pull-request/<branch>. Always run with --dry-run first and confirm the
destination ref before invoking it without the flag. Never run against a
shared or protected branch — only target your own pull-request branch.
Safe preflight: python tools/trigger_internal_ci.py --gitlab-origin gitlab --dry-run.
Add the optional --functional-test-* flags only after the dry-run output
matches the intended destination.The main workflow is .github/workflows/cicd-main.yml. It triggers on pushes
to branches matching pull-request/[0-9]+ and deploy-release/*, on merge
groups, and on manual dispatch.
Images are pushed to:
766267172432.dkr.ecr.us-east-1.amazonaws.com/…us-east4-docker.pkg.dev/nv-projdgxchipp-20260113193621/megatron-lm/…The CI pipeline reads PR labels to decide test scope, n_repeat, and container image.
Decision tree (first match wins):
| Condition | scope | n_repeat | lightweight | Notes |
|---|---|---|---|---|
| Merge group | mr-github | 1 | false | Automatic, no label needed |
| (no label) | mr-github-slim | 2 | false | Slim subset only |
Orthogonal image label:
| Label | Effect |
|---|---|
container::lts | Build on the older long-term-support NGC PyTorch base instead of dev's latest — a backward-compat check, not a different test set (combinable with any scope label) |
Run MBridge tests | Also triggers the MBridge L1 test suite |
Run NeMoRL tests | Also triggers NeMo RL's Megatron functional test suite |
Adding a label does not itself start cicd-main.yml; apply it before the next
synthetic PR push or rerun the workflow after applying it.
| Changed paths / nature of change | Label to attach |
|---|---|
Docs only (docs/, *.md, docstrings) | (none) |
CI/tooling only (.github/, tools/, Makefile) | (none) |
| Touches MBridge integration | add Run MBridge tests |
| Could affect NeMo RL's Megatron integration | add Run NeMoRL tests |
Use tools/trigger_internal_ci.py after the internal GitLab remote and
GITLAB_TOKEN are configured; see @tools/trigger_internal_ci.md for setup
details. First run a dry run and verify the destination ref:
The script force-pushes the current branch to pull-request/<branch> before
triggering the pipeline. Only target your own pull-request branch, never a shared
or protected branch. Add optional --functional-test-* flags only after the
dry-run output matches the intended destination.
CI branches always follow the pattern pull-request/<number>.
Full per-rank logs are not in the runner stdout. They are uploaded as
GitHub artifacts named logs-<test_case>-<run_id>-<uuid>.
tools/autoformat.sh locally; the diff shows exactly what needs to change.cicd-container-build job log.cicd-unit-tests-latest job matrix.cicd-integration-tests-* job. Start with stdout.log for rank 0.