已合并
feat: build.sh 按配置变更自动决定是否清理缓存 #173
fujun19创建于 6月17日
feat: build.sh 按配置变更自动决定是否清理缓存 #173
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 fujun19 的贡献)6月17日 添加了label:cann-cla/yes
CANN-robot
6月17日 评论:
6月17日 评论:
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-cann/amct | ✅ zhuliangying, 姚广修 (2/2) | ✅ zhuliangying (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
fujun19, thanks for your pull request. All authors of the commits have signed the CLA. 👍


6月17日 添加了label:ci-pipeline-running
CANN-robot
6月17日 评论:
6月17日 评论:
流水线任务触发成功
任务链接 [d14b5f67b69e4e938c6ce785eff36a8f][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| cocheck_codestyle | ✅ SUCCESS | ||
| precommit | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_torch | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_torch_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_torch | ✅ SUCCESS | >>>>> | >>>>> |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| UT_Test | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900 | ✅ SUCCESS | >>>>> |
[2026-06-17 16:00:18] CI执行结束


6月17日 删除了label:ci-pipeline-running
6月17日 添加了label:ci-pipeline-passed
CANN-robot
6月17日 评论:
6月17日 评论:
流水线 PR-pipeline_cann_amct#935 [ commitID:f74b3670 ] 已完成


yaoguangxiu
6月17日 评论:
6月17日 评论:
/lgtm


zhuliangying
6月22日 评论:
6月22日 评论:
/approve


6月22日 添加了label:lgtmapproved
6月22日 删除了label:ci-pipeline-passed
CANN-robot
6月22日 评论:
6月22日 评论:
The following label is not ready.
ci-pipeline-passed: The ci-pipeline-passed label is expired. Please compile again.


6月22日 添加了label:ci-pipeline-running
CANN-robot
6月22日 评论:
6月22日 评论:
流水线任务触发成功
任务链接 [73735d405b204d75995715edafecc23c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| cocheck_codestyle | ✅ SUCCESS | ||
| precommit | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_torch | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_torch_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_torch | ✅ SUCCESS | >>>>> | >>>>> |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| UT_Test | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900 | ✅ SUCCESS | >>>>> |
[2026-06-22 20:35:03] CI执行结束


6月22日 删除了label:ci-pipeline-running
6月22日 添加了label:ci-pipeline-passed
6月22日 合入了pull request
描述
原来每次构建都无条件删除
build/目录,导致无法利用增量编译,每次均为全量构建。改为读取
CMakeCache.txt中的关键编译参数(CMAKE_BUILD_TYPE、ENABLE_EXPERIMENTAL、ENABLE_ASAN),仅在这些值发生变化时才清理缓存,其余情况复用已有构建产物。用户无需感知清理时机,脚本自动判断:
--torch/--pkg)→ 增量构建--build-type、--experimental、--asan有变化 → 自动全量清理后重建build/不存在 → 直接创建,正常构建如何测试
bash build.sh --torch,记录编译时间bash build.sh --torch,确认复用缓存,编译时间明显缩短bash build.sh --torch --build-type=Debug,确认输出Build config changed, cleaning build cache...并全量重建bash build.sh --pkg与bash build.sh --torch,确认无问题文档更新
无需更新文档。
类型标签