Skip to content

refactor(codegen): update trainer family preparation for bundles - #1625

Open
shawny999 wants to merge 18 commits into
mindspore-ai:masterfrom
shawny999:codegen_familly_restrcuture
Open

shawny999 wants to merge 18 commits into
mindspore-ai:masterfrom
shawny999:codegen_familly_restrcuture

Conversation

@shawny999

@shawny999 shawny999 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Paired: GitHub #1625 ↔ GitCode !1999

What type of PR is this?

/kind refactor

What does this PR do / why do we need it:

将 Codegen 构建输入对齐到共享模型构建与 Family preparation 流程,使生成模型复用已完成的组件替换及布局来源记录。

主要变更:

  • 新增模型构建捕获和 Preparation Manifest,记录组件边界、替换声明及应用结果、构造来源和原生绑定。
  • 将捕获结果投影为不可变、无运行时资源的构建 IR,供 replacement、inline 和 modeling 生成阶段使用,并校验边界关联。
  • 为生成模型记录预安装组件,保留 Family 构建来源与布局归属,避免重复替换。
  • 移除 Codegen 专属 model-build/planner overlay,接入共享构建捕获入口。
  • 更新 DeepSeek V3/V3.2/V4.1、Kimi K2.6、Qwen3-MoE 的生成产物,并补齐 Kimi K3、Qwen3-VL-MoE 的相关适配。

测试覆盖(新增或更新的用例,不代表当前门禁已全部通过):

  • 构建捕获及 Preparation Manifest 的完整性、边界关联和来源记录。
  • Manifest 到构建 IR 的投影及非法输入校验。
  • CLI、离线构建、替换生成与预安装组件回归。
  • 原生与生成 MLA Family 的请求、参数布局、CP 策略及布局归属兼容性。
  • 延迟预训练构建及相关模型适配器契约。
    Which issue(s) this PR fixes:

?????? issue?? PR ??????????

Code review checklist [illustration]:

  • whether to verify the function's return value (It is forbidden to use void to mask the return values of security functions and self-developed functions. C++ STL functions can be masked if there is no problem)
  • Whether to comply with SOLID principle / Demeter's law
  • Whether there is UT test case && the test case is a valid (if there is no test case, please explain the reason)
  • Whether the API change is involved
  • Whether official document modification is involved

Special notes for your reviewers:

  • 本 PR 调整共享模型 preparation 与 Codegen 内部接口,并更新测试及生成产物。
  • 本 PR 未修改正式说明文档;请重点检查构建一致性、预安装组件识别和布局来源保留。
  • 测试覆盖说明依据 PR 中的测试变更整理,最终通过情况以当前提交的门禁结果为准。

@shawny999

Copy link
Copy Markdown
Contributor Author

/check-pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants