Merged
fix: 修复离线场景三方件下载与在线构建URL不一致问题 #14028
fix: 修复离线场景三方件下载与在线构建URL不一致问题 #14028
Merged
AlmaAdd on 22 days ago
Alma
AlmaCollaborators
22 days ago

描述

fix: 修复离线场景三方件下载与在线构建URL不一致问题

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for Alma's contribution.)
AlmaAlmaCollaborators
22 days ago Created pull request, commit c327cd33
atomgit-bot
atomgit-bot
22 days ago Comments:

变更摘要

本次变更聚焦修复离线场景下三方件下载地址与在线构建 URL 不一致的问题。核心做法是将原先基于 urllib 的下载脚本 scripts/tools/third_lib_download.py 删除,新增基于 bash 的 scripts/download_3rd_party.sh,并把三方件的下载 URL、SHA256 校验值与 CANN_CMAKE_TAG 与 cann-cmake 的 third_party/*.cmake 配置对齐;同时将 cmake/fetch_cann_cmake.cmake 中的 CANN_CMAKE_TAG 由 master-058 升级到 master-059,并同步更新对应的 URL_HASH。

主要改动

  • 离线下载脚本替换: 删除 scripts/tools/third_lib_download.py,新增 scripts/download_3rd_party.sh,下载入口由 Python 调整为 Bash 脚本。
  • 三方件来源与校验统一: 新脚本为 json、googletest、eigen、abseil-cpp、protobuf、makeself、pybind11、cann-cmake 等引入与在线构建一致的 URL(主要为 cann-3rd.obs.cn-north-4.myhuaweicloud.com 与 gitcode.com 源)及 SHA256 值,并新增 CVE-2025-0838 abseil-cpp 补丁与 makeself 补丁的下载,统一存放于 <目录>/patch。
  • 缓存复用与完整性校验: fetch 函数在二次调用时先做 SHA256 比对,hash 一致则直接复用、不一致或无参考 hash 则删除重下,并在下载后复核完整性。
  • git 仓库下载逻辑调整: 新增 clone_repo 函数对 opbase、ops-tensor、catlass 三个仓库执行 git clone 并切换至指定 tag(commit),且在无 git 时给出跳过与手动执行提示。
  • cann-cmake 版本与哈希更新: cmake/fetch_cann_cmake.cmake 中 CANN_CMAKE_TAG 更新为 master-059,对应离线包 URL_HASH SHA256 由 03d63afb... 更新为 9e59939b...。

🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
22 days ago Added label: cann-cla/yes
AlmaAlmaCollaborators
22 days ago Modify description of pull request
CANN-robot
CANN-robotCollaborators
22 days ago Comments:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
cmake ✅ wang-minbo, 刘丹, 蒋礼锐 (3/2) ✅ wang-minbo, 刘丹, 蒋礼锐 (3/1)
docs ✅ wang-minbo, 刘丹, 蒋礼锐 (3/2) ✅ wang-minbo, 刘丹, 蒋礼锐 (3/1)
scripts ✅ 刘丹, 蒋礼锐, wang-minbo (3/2) ✅ wang-minbo, 刘丹, 蒋礼锐 (3/1)
sig-ops-transformer ✅ 刘丹, 蒋礼锐 (2/2) ✅ 蒋礼锐, 刘丹 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

Leeshoujem, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
47 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
19 days ago Merged pull request
AlmaAlmaCollaborators
19 days ago Deleted associated issue: [Bug-Report|缺陷反馈]: 离线编译有问题
AlmaAlmaCollaborators
19 days ago Associated issue: [Bug-Report|缺陷反馈]: 编译报错反馈不完整
AlmaAlmaCollaborators
19 days ago Deleted associated issue: [Bug-Report|缺陷反馈]: 编译报错反馈不完整
AlmaAlmaCollaborators
19 days ago Associated issue: [Bug-Report|缺陷反馈]: 编译报错反馈不完整