一键导入
mcore-split-pr
Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.
Bump the NVIDIA PyTorch base image (`nvcr.io/nvidia/pytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker/.ngc_version.dev` and GitLab CI in `.gitlab/stages/01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs
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.
Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.
Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.
Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.
| name | mcore-split-pr |
| description | Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups. |
| license | Apache-2.0 |
| when_to_use | User asks to split a PR, reduce reviewer groups, or break up a large PR; 'too many CODEOWNERS', 'split this PR', 'break up PR', 'reduce reviewers needed'. |
| user_invocable | true |
| argument | PR URL or number |
| metadata | {"author":"Philip Petrakian <ppetrakian@nvidia.com>"} |
Split a large pull request into multiple smaller PRs, where each PR touches
the fewest possible CODEOWNERS reviewer groups. The goal is to reduce review
burden: a PR that only touches megatron/core/ needs only the core reviewers,
while a PR that also touches examples/, tools/, and megatron/training/
pulls in many additional groups.
For split-planning questions, lead with these constraints before the full workflow:
pull-request/<base PR number>, not the base PR author's branch.main and
refresh it against main; otherwise GitHub may automatically close the
dependent PR, losing approvals and review discussion.git diff upstream/main..<source-branch> -- <paths> | git apply, pushes
to the user's fork, and never pushes directly to upstream.gh pr view <number> --repo NVIDIA/Megatron-LM --json title,body,headRefName,author and gh pr diff <number> --repo NVIDIA/Megatron-LM --stat. Also determine the current GitHub user with gh api user --jq .login..github/CODEOWNERS to build a mapping from file path patterns to owner groups.The primary optimization goal: minimize the number of CODEOWNERS reviewer groups required for each resulting PR.
Strategy:
Present the proposed split as a table:
Wait for user approval before proceeding.
For each new PR:
main, or a dependency PR's branch).git diff upstream/main..<source-branch> -- <file paths> | git apply.pull-request/<base PR number>.pull-request/<base PR number> while stacked, then be retargeted and refreshed to main before the base PR is merged.