Merged
docs: c_api figures图片统一迁移至api/figures并同步更新引用 #7095
munanhwAdd on 9 days ago
docs: c_api figures图片统一迁移至api/figures并同步更新引用 #7095
Merged
munanhwAdd on 9 days ago
munanhwCollaborators
9 days ago

描述

将 docs/zh/api/SIMD-API/c_api/figures 目录下的全部图片统一迁移至 docs/zh/api/figures 目录,便于图片资源集中管理。

  • c_api/figures 下8个与 api/figures 重名但内容不同的图片加 _c_api 后缀改名后迁移,与仓内已有的 xxx_c_api.png 命名惯例保持一致
  • 4个与 api/figures 内容完全相同的图片去重删除
  • 其余95个图片移动至 api/figures,原目录清空
  • 同步修改82个md文件共187处图片引用路径,指向迁移后的新位置
  • 补充修正 move_mask.md 中2处指向已迁移目录的图片引用(跟随master最新基线)

关联的Issue

无

测试

  • 已验证指向 c_api/figures 的图片引用清零
  • 已验证 api/figures 下全部1398处图片引用目标文件存在,无缺失链接

文档更新

本PR即为文档更新:82个md文件引用路径修改,103个图片文件迁移至 api/figures

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for munanhw's contribution.)
MmunanhwCollaborators
9 days ago Created pull request, commit 2a276265
atomgit-bot
atomgit-bot
9 days ago Comments:

变更摘要

本 PR 主要是文档资源整理:把 docs/zh/api/SIMD-API/c_api/figures 目录中的图片集中迁移到 docs/zh/api/figures,并同步更新所有 Markdown 文档中的图片引用路径。c_api 下各接口文档的图片链接由原来的 ../figures、../../figures 等相对路径,改为统一指向 docs/zh/api/figures 的多级相对路径(如 ../../../../figures/...);对于与已有图片重名但内容不同的图片,新增 _c_api 后缀以区分;内容完全相同的图片则去重。move_mask.md 等文件中原先指向 c_api/figures 的引用也一并修正。

主要改动

  • c_api 文档图片路径统一迁移: docs/zh/api/SIMD-API/c_api 下的 atomic、cache_ctrl、cube_compute、cube_datamove、data_move_guide、defs、deprecated_interface、reg_compute、sync、vector_compute、vector_datamove 等各接口文档中的图片引用,全部改为指向统一目录 api/figures,并按文件层级调整相对路径深度。
  • 重名图片加 _c_api 后缀: 在 key_features.md(atomic、reg_compute、sync/inter_core_sync)、data_move_concept.md、overall_constraints.md、asc_scatter_deprecated.md、asc_sync_intra_arrive.md 等文件中,引用改为 software_synchronization_between_two_cores_flowchart_c_api.png、continuous_data_copy_diagram_c_api.png、datacopy_address_overlap_sync_diagram_c_api.png、reg_scatter_c_api.png、inter_core_aic_all_sync_c_api.png、single_core_aiv_all_sync_c_api.png、single_core_aic_aiv_sync_aiv_setflag_c_api.png、single_ai_core_aic_single_aiv_sync_c_api.png 等带后缀的新文件名,以区分同名但内容不同的图片。
  • tensor_api 引用跟随迁移修正: docs/zh/api/SIMD-API/tensor_api/reg_vector_compute/reg_data_copy/move_mask.md 中两处 capi_copy_reg2mask_b16.png、capi_copy_reg2mask_b32.png 引用由 ../../../c_api/figures/... 改为 ../../../../figures/...,与 c_api 侧 asc_copy.md 的引用保持一致。
  • 通用约束与说明类文档同步更新: general_description_and_constraints.md、data_path.md、data_move_concept.md、reg_load_overview.md 等偏说明性的文档中,掩码操作、DataBlock 步长、非对齐搬入搬出、硬件架构等示意图的引用路径同步改为指向 api/figures。
  • 文档内部链接一致性: 被迁移图片在原 c_api/figures 目录的引用已清零,api/figures 下引用目标均指向迁移后的实际文件,保证文档图片可正常渲染。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
9 days ago Comments:

代码审查

审查结论

  • [建议] docs/zh/api/SIMD-API/c_api/general_description_and_constraints.md:49 fix: 迁移后 c_api/experimental 下 3 处 ../figures 引用成为死链
  • [建议] docs/zh/api/SIMD-API/c_api/reg_compute/reg_arith/asc_mull.md:45 fix: 补全 experimental 目录下仍指向已清空 c_api/figures 的图片引用
类型 数量
🔴 阻塞 0
🟡 建议 2

💬 仅评论

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
9 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
9 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
docs ✅ bianque, ai_xin (2/2) ✅ ai_xin (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
9 days ago Set zengjuan,zhanghao_0689,suqwe,wulinyu,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,yangbinhua,zhudi22,chenyiyuan,xun_zhuge,XuebinYang,sjtulxh,bianque,houyuyang,Lycheeeee,YANXI_ZHAO,chentianyu19,shi_nanxiang,wuyang_hw,jiangxinyu3,ai_xin,ascendhjh,hujiawen_kaven,wangxiaozhi,DragonBornHD84,louyuxuan,hyolee,yukangchen as approver
CANN-robotCANN-robotCollaborators
9 days ago Set bianque,ai_xin,ascendhjh as approver
munanhwCollaborators
9 days ago Comments:

/compile

likedislike
MmunanhwCollaborators
9 days ago Pre merge succeeded (commit_id: 92ba6a9469c01cfee137fdda216e8df698c62cbc)
CANN-robot
CANN-robotCollaborators
9 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
9 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
9 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
9 days ago Added label: ci-pipeline-failed
atomgit-bot
atomgit-bot9 days agoStart code review1
docs/zh/api/SIMD-API/c_api/reg_compute/reg_arith/asc_mull.md
@@ -43,3 +43,3 @@
4343**图 1** asc_mull计算示意图
4444 
45-![](../../figures/asc_mull.png)
45+![](../../../../figures/asc_mull.png)
atomgit-bot
atomgit-bot9 days agoComments:

🟡 Medium Priority

本片 diff 把 c_api/figures 下的图片全部迁到 docs/zh/api/figures 并同步改写本文件第 45 行为 ../../../../figures/asc_mull.png(reg_arith/ 回退四级到 docs/zh/api,路径正确)。但“原目录清空”未同步到内容等价的同级文档 docs/zh/api/SIMD-API/c_api/experimental/:

证据链:这三个文件位于 docs/zh/api/SIMD-API/c_api/experimental/,../figures 仅回退一级即 c_api/figures,正是本次迁移清空的目录;docs/zh/api/SIMD-API/c_api 子树下已无任何 figures 图片文件(**/figures/** 无命中),而 asc_mull.png、capi_deintlv_reg.png、asc_intlv.png 现已存在于 docs/zh/api/figures/。PR 描述的校验是按字符串 c_api/figures 搜索引用,这三处不含该字面量,因此被漏检。

失败模式:文档站渲染时这三篇 experimental 文档的示意图变成断链缺图(图片 404),且与本文件中已改写的同名图形成“同图两套路径”的不一致。触发条件确定,无需特殊输入。

修复:将上述三处改为 ../../../figures/<同名图片>(从 c_api/experimental/ 回退三级到 docs/zh/api),与 c_api/vector_datamove/*.md、c_api/reg_compute/*.md 的写法一致。

建议:补全迁移剩余引用:将 experimental/asc_mull.md:47、experimental/asc_deintlv.md:42、experimental/asc_intlv.md:40 的 ../figures/... 改为 ../../../figures/...;校验脚本应按解析后的绝对路径而不是字面量 c_api/figures 检查,避免同义相对路径漏检。

likedislike
Incorrect?
atomgit-bot
atomgit-bot9 days agoStart code review1
docs/zh/api/SIMD-API/c_api/general_description_and_constraints.md
@@ -47,3 +47,3 @@
4747**图1** 地址重叠示例(不支持)
4848 
49-![地址重叠示例(不支持)](figures/unsupported_address_overlap_example.png)
49+![地址重叠示例(不支持)](../../figures/unsupported_address_overlap_example.png)
atomgit-bot
atomgit-bot9 days agoComments:

🟡 Medium Priority

本次改动把 c_api 目录下所有图片引用从 c_api/figures 改写到 docs/zh/api/figures(本行由 figures/unsupported_address_overlap_example.png 改为 ../../figures/...,deprecated_interface 改为 ../../../figures/...,reg_compute/load 改为 ../../../../figures/...),PR 描述同时声明「已验证指向 c_api/figures 的图片引用清零」「原目录清空」。

但在同一目录树内仍有 3 个未随本次改动更新的文件,保持旧写法 ../figures/...,它们解析到的正是被清空的 c_api/figures:

对照证据:相同图片在迁移后的路径已被其它文件使用(reg_arith/asc_mull.md:45 → ../../../../figures/asc_mull.png、reg_permute_sel/asc_intlv.md:38、reg_permute_sel/asc_deintlv.md:40 → ../../../../figures/capi_deintlv_reg.png),说明这些图片的权威副本已位于 api/figures;本次迁移(把 c_api/figures 清空/去重)恰好抽掉了 experimental 三处引用的目标文件。

失效模式:c_api/figures 被清空后,上述 3 个页面渲染时图片缺失(CI 图片链接校验也会失败),与 PR 自述的「引用清零/无缺失链接」结论矛盾。属于本次一侧改动造成的跨文件不一致。修复:把这 3 处改为 ../../figures/<同名文件>(experimental 相对 api/figures 需要上溯 2 级),并重新跑一次全仓图片引用存在性检查以覆盖 c_api 之外可能存在的同类残留。

建议:将 docs/zh/api/SIMD-API/c_api/experimental/asc_mull.md:47、asc_intlv.md:40、asc_deintlv.md:42 的 ../figures/... 分别改为 ../../figures/asc_mull.png、../../figures/asc_intlv.png、../../figures/capi_deintlv_reg.png,确保 c_api/figures 清空后无残留死链。

likedislike
Incorrect?
CANN-robot
CANN-robotCollaborators
9 days ago Comments:

流水线分析报告 — asc-devkit run#6929

流水线: https://gitcode.com/CANN/asc-devkit/actions/runs/54af4f2bbdc148888f02436581883f09 | PR#7095 | 2026-10-30 09:30:15 ~ 2026-10-30 09:32:23 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误 — Markdown link check 失败(experimental/ 下 3 个文档图片引用未随图片迁移同步更新)
  • 失败类型: 代码问题(PR 变更引入,需提交者修复)
  • 失败 Job: CodeCheck_precommit(耗时 52s;同 run 其余 Job 均 COMPLETED,ut / API_Check / PreSmoke_A2 等下游 Job 为级联未启动,非独立失败)
  • 根因: 本 PR 将 SIMD-API c_api 文档图片统一迁移至 docs/zh/api/figures/ 并批量更新了 249 个文档的引用路径,但遗漏了 docs/zh/api/SIMD-API/c_api/experimental/ 目录下 3 个文档(asc_deintlv.md / asc_intlv.md / asc_mull.md)——它们仍引用旧路径 ../figures/*.png(解析为 docs/zh/api/SIMD-API/c_api/figures/),该位置图片已不存在,Markdown link check 报 File not found
  • 处置建议: 通知 PR 提交者按下方根因分析中的具体修改点更新这 3 个文档的图片引用后重新推送触发
  • 排除项: 无平台内部错误(日志中无 DEV-CODECI 类错误码);::error::precommit.py 异常退出: exit code=1 仅为检查项失败的汇总退出信号,真实错误为上述 3 条 File not found

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — Markdown link check:3 个 experimental 文档引用的图片文件不存在
  • 判据: pre-commit 检查项 Markdown link check 不通过(Failed,exit code=1)
  • 定位步骤: 3_precommit.log
  • 影响 Job: CodeCheck_precommit
  • 根因证据(日志原文):
[2026-10-30 09:32:00.054+08:00] Markdown link check......................................................Failed
[2026-10-30 09:32:00.077+08:00] [Markdown check] FAILED: 3 failed item(s), 0 warning item(s), 276 file(s) checked, duration=15s.
[2026-10-30 09:32:00.080+08:00] docs/zh/api/SIMD-API/c_api/experimental/asc_deintlv.md: [ERROR] file:///runner/workers/***.version/worker_dir/cann/asc-devkit/docs/zh/api/SIMD-API/c_api/figures/capi_deintlv_reg.png | Cannot find file: File not found. Check if file exists and path is correct
[2026-10-30 09:32:00.081+08:00] docs/zh/api/SIMD-API/c_api/experimental/asc_intlv.md: [ERROR] file:///runner/workers/***.version/worker_dir/cann/asc-devkit/docs/zh/api/SIMD-API/c_api/figures/asc_intlv.png | Cannot find file: File not found. Check if file exists and path is correct
[2026-10-30 09:32:00.083+08:00] docs/zh/api/SIMD-API/c_api/experimental/asc_mull.md: [ERROR] file:///runner/workers/***.version/worker_dir/cann/asc-devkit/docs/zh/api/SIMD-API/c_api/figures/asc_mull.png | Cannot find file: File not found. Check if file exists and path is correct
  • 证据链: 上述 3 个文档均不在 PR#7095 的 570 个变更文件中(引用路径未随 PR 更新);对应图片 capi_deintlv_reg.png / asc_intlv.png / asc_mull.png 已在本 PR 中迁移至 docs/zh/api/figures/;PR 已批量将 c_api 其余子目录 249 个 md 的引用由 ../figures/ 改为 ../../../figures/(指向 docs/zh/api/figures/),唯独遗漏 experimental/ 目录下这 3 个文档,导致其引用解析到已无文件的旧位置 SIMD-API/c_api/figures/。

  • 修复建议(PR 提交者): 将以下 3 个文档中的图片引用由 ../figures/xxx.png 改为 ../../../figures/xxx.png(与本 PR 其余文档改法一致,指向 docs/zh/api/figures/):

    • docs/zh/api/SIMD-API/c_api/experimental/asc_deintlv.md → capi_deintlv_reg.png
    • docs/zh/api/SIMD-API/c_api/experimental/asc_intlv.md → asc_intlv.png
    • docs/zh/api/SIMD-API/c_api/experimental/asc_mull.md → asc_mull.png

    修复后本地可执行 pre-commit run Markdown-link-check 自验,参考 本地执行 pre-commit 指导

结构化定界摘要
[{"repo": "asc-devkit", "run_number": 6929, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误",
  "Failed_Reason": "pre-commit Markdown link check 失败: PR 批量迁移图片至 docs/zh/api/figures/ 后, experimental/ 下 3 个文档(asc_deintlv.md/asc_intlv.md/asc_mull.md)图片引用未同步更新, 仍指向旧路径 SIMD-API/c_api/figures/, 图片不存在",
  "evidence": "[2026-10-30 09:32:00.083+08:00] docs/zh/api/SIMD-API/c_api/experimental/asc_mull.md: [ERROR] file:///runner/workers/***.version/worker_dir/cann/asc-devkit/docs/zh/api/SIMD-API/c_api/figures/asc_mull.png | Cannot find file: File not found. Check if file exists and path is correct",
  "suggestion": "代码问题: 通知 PR 提交者将 experimental/ 下 3 个文档的图片引用 ../figures/xxx.png 更新为 ../../../figures/xxx.png 后重新推送触发",
  "jobs": "CodeCheck_precommit"}]

由门禁失败定界分析自动生成 | repo: asc-devkit | run: 54af4f2bbdc148888f02436581883f09 | PR#7095

likedislike
MmunanhwCollaborators
9 days ago Pre merge succeeded (commit_id: c00fd3b5b915887d56a870355e6e3347921120a9)
MmunanhwCollaborators
9 days ago Force-pushed 1 commits:86b8bbc2-docs: c_api figures图片统一迁移至api/figures并同步更新引用
MmunanhwCollaborators
9 days ago Pre merge succeeded (commit_id: 4dfdd10a33e56690c737226f9a9bfe0daf2a96a1)
CANN-robotCANN-robotCollaborators
9 days ago Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
9 days ago Added label: cann-cla/yes
munanhwCollaborators
9 days ago Comments:

/compile

likedislike
MmunanhwCollaborators
9 days ago Pre merge succeeded (commit_id: d54c33a9ce29ebd9baf26aa407dda75b0716b2a6)
CANN-robot
CANN-robotCollaborators
9 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
9 days ago Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
9 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
9 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
9 days ago Added label: ci-pipeline-passed
bianqueCollaborators
9 days ago Comments:

/lgtm

likedislike
MmunanhwCollaborators
9 days ago Resolved final issue
ai_xinCollaborators
9 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
9 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
9 days ago Merged pull request