已合并
[installation] 支持msot按需打包 #104
wanghaopeng创建于 7月6日
[installation] 支持msot按需打包 #104
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wanghaopeng 的贡献)7月6日 添加了label:ascend-cla/yes
ascend-robot
7月6日 评论:
7月6日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/msot | ✅ 门飞飞, zsz_wlf (2/2) | ✅ 门飞飞 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
RainbowWhp, thanks for your pull request. All authors of the commits have signed the CLA. 👍


ascend-robot
7月6日 评论:
7月6日 评论:
ascend docs pipeline is running...


7月6日 添加了label:docs-ci-pipeline-running
7月6日 修改了pull request 的描述
此处折叠了57条消息 查看更多
ascend-robot
7月8日 评论:
7月8日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


ascend-robot
7月8日 评论:
7月8日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


ascend-robot
7月8日 评论:
7月8日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


7月8日 关联了issue:[Installation]: 支持按需构建打包
ascend-robot
7月8日 评论:
7月8日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


1. 修改描述
当前总包构建默认会把所有子工具都构建并打入 run 包,无法按需裁剪。
有些场景只需要部分子工具,排除无关子工具可以减少构建耗时,并避免最终 run 包携带不需要的 whl/run 子包。
需要保持默认行为不变:不传参数时仍然全部包含。
在 build.py 增加 --exclude-tools 参数,接收逗号分隔的子工具名。
在顶层 CMakeLists.txt 中根据排除列表动态决定是否 include() 对应子工具模块,并只依赖未排除的 package_* target。
在 package/script/parser.py 中增加 --exclude_tools 参数,解析 filelist.xml 时跳过被排除工具对应的文件项。
在 package/conf/filelist.xml 中给各子工具产物增加 tool 属性,用于 parser 过滤。
build.py
新增支持工具白名单:msdebug, mskl, mskpp, msopgen, msopprof, mssanitizer。
新增 normalize_excluded_tools(),支持去空格、小写、去重和非法值校验。
产品构建时将排除列表传给 CMake:-DMSOT_EXCLUDE_TOOLS=...。
CMakeLists.txt
新增 MSOT_EXCLUDE_TOOLS CMake 变量。
被排除工具不再加载对应 cmake/module/*.cmake。
package_msot 只依赖未排除子工具。
调用 parser 时同步传入排除列表。
打包前清理总包 staging 目录,避免旧产物残留进 run 包。
package/script/parser.py
新增排除工具解析逻辑。
Xmlparser 支持 excluded_tools。
遇到 XML 文件项的 tool 命中排除列表时,不生成 filelist 记录,也不复制进总包目录。
package/conf/filelist.xml
给各子工具包文件增加 tool 属性。
msopgen 同时标记 mindstudio_opgen 和 mindstudio_opst 两个 whl。
2. 功能验证
3. 代码检视
4. 资料修改自检