megatron-impact-mapper
Megatron Impact Mapper
Resolve the correct MindSpeed branch context and map each relevant Megatron event onto concrete MindSpeed implementation targets. This skill is the gatekeeper for implementation-oriented migration generation.
Hard Gate
Do not generate migration patches until branch alignment is explicit.
Use one of these alignment sources:
- user-supplied mapping
- a known rule in branch-alignment.md
- a repository-local document or commit that states the mapping clearly
If none of these is available, stop at an impact report.
Core Rules
- Treat
MindSpeed branch <-> Megatron branchalignment as mandatory for strict migration mode. - Use only official repositories as the source of truth for first-pass analysis.
- Distinguish between
strict migration modeandexploration mode. - For
megatron main, prefer exploration mode unless the user explicitly chooses a compatible MindSpeed baseline for comparison. - Separate three outcomes: already adapted, likely adaptable but missing, not worth adapting now.
- Do not stop at "candidate paths" when a feature is clearly migration-worthy. Break the feature into implementation targets that correspond to the upstream implementation units.
Workflow
- Resolve the MindSpeed branch.
- Resolve the mapped Megatron baseline branch.
- Compare the baseline against the target Megatron branch or change-set.
- For each relevant Megatron event, search for corresponding MindSpeed modules, wrappers, configs, launch paths, and tests.
- Map upstream implementation units onto local implementation targets.
- Produce an impact report with confidence, rationale, and implementation scope.
- Allow handoff to migration generation only for high-confidence impact items.
Required Output
Produce an impact_report with:
{
"mindspeed_branch": "master",
"megatron_base_branch": "core_v0.12.1",
"megatron_target_branch": "core_v0.15.3",
"mode": "strict",
"items": [
{
"event_title": "Add feature X",
"status": "likely_missing",
"confidence": 0.78,
"candidate_paths": ["mindspeed/path_a.py", "mindspeed/path_b.py"],
"reason": "Short factual rationale",
"primary_commit": "sha1",
"upstream_changed_files": ["megatron/path_a.py", "megatron/path_b.py"],
"implementation_targets": [
{
"name": "Expose config on MindSpeed side",
"source_unit": "Expose new config flag",
"candidate_paths": ["mindspeed/arguments.py"],
"required_change": "Add argument or YAML surface",
"confidence": 0.82
},
{
"name": "Port runtime behavior",
"source_unit": "Add runtime behavior",
"candidate_paths": ["mindspeed/training.py", "mindspeed/core/training.py"],
"required_change": "Recreate the training shutdown logic locally",
"confidence": 0.67
}
],
"covered_units": ["Expose config on MindSpeed side"],
"missing_units": ["Port runtime behavior"]
}
]
}
Decision Rules
- If alignment is unresolved: report only.
- If alignment is resolved but implementation targets are weakly supported: report plus implementation plan, not direct edits.
- If alignment and implementation targets are both high confidence: allow migration patch generation.
- If an item has only one touched local file but the upstream event clearly spans multiple implementation units, mark the uncovered units explicitly instead of pretending the feature is fully mapped.
References
- Read branch-alignment.md before doing any strict migration work.
- Read mindspeed-focus-areas.md when searching for candidate adaptation paths.
- Run resolve_branch_alignment.py to deterministically classify a branch pair as
strict,exploration, orunresolved. - Run scan_mindspeed_paths.py to search the official MindSpeed repository on a specific branch for likely adaptation points using feature names, file names, symbols, or config keys.
- Run map_implementation_targets.py to convert upstream implementation units into local MindSpeed implementation targets before patch generation.
- Hand off only approved items to $megatron-migration-generator.
More from ascend/agent-skills
ascendc-operator-dev
AscendC算子端到端开发编排器。当用户需要开发新算子、实现自定义算子、或完成从需求到测试的完整流程时使用。关键词:算子开发、operator development、端到端、完整流程、工作流编排、新建算子。
56ascendc-operator-doc-gen
为AscendC算子生成PyTorch风格的接口文档(README.md)。触发场景:编译调试通过后需要生成接口文档,或用户提到"生成算子文档"、"创建README"、"文档化算子"、"帮我写文档"(算子上下文)、"算子文档"时使用。
55ascendc-operator-design
完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。
55ascendc-operator-precision-eval
AscendC算子精度评估。对已编译安装的算子生成全面的精度测试用例集(≥30例),运行并生成精度验证报告。关键词:精度测试、precision evaluation、精度报告、accuracy、误差分析。执行完成后 MUST 在当前对话中展示总览、失败摘要与关键发现,不得仅附报告路径。
54ascendc-operator-testcase-gen
完成AscendC算子验证用例生成 - 帮助用户完成testcase设计。当用户提到用例设计、泛化用例生成、算子标杆、UT用例、精度用例、性能用例时,使用此skill。
54ascendc-operator-project-init
初始化 AscendC 算子工程并创建可编译的算子骨架。触发场景:(1) 用户要求创建新算子;(2) 关键词:ascendc算子、新建算子、算子目录、算子初始化;(3) 需要基于 ascend-kernel 模板快速落地。本 skill 不只建目录,还输出“可继续开发”的标准文件与检查清单。
54