已合并
docs: 完善C API数据依赖同步约束说明 #6689
docs: 完善C API数据依赖同步约束说明 #6689
已合并
lihuaichao创建于 8 天前
lihuaichao成员
8 天前

描述

完善SIMD C API的数据依赖同步约束,将原先仅针对地址重叠的同步要求调整为数据依赖场景,避免用户误以为只有目的地址重叠时才需要同步。

  • Cube搬运与Vector搬运:统一数据依赖同步要求,链接至系统同步能力概述。

  • Reg计算相关搬入、搬出、scatter及squeeze接口:完善数据依赖约束,明确使用asc_mem_bar。

  • 仅提交docs目录下82个Markdown文件的修改,不涉及实现代码,也不包含此前只检查未修改的其他接口。

  • 修正asc_get_mask_spr调用示例:VF外设置掩码,VF内读取b16掩码,通过for循环进行Reg广播和写入;GM、UB及Host数据统一使用uint16_t。

  • 明确5个align搬运接口文档的功能说明:支持搬运数据长度不是32字节整数倍的数据,长度仍需满足数据类型字节对齐要求;起始地址对齐要求参见参数说明。

  • 优化align接口功能说明:GM到UB、GM到L1首段仅概括搬运长度的32字节对齐补齐,删除泛化的Padding描述;填充能力按架构、原型和模式在后文分别说明。UB到GM保留仅写入有效数据、丢弃补齐数据的说明,地址对齐要求保持不变。

关联的Issue

无。

测试

  • git diff --check:通过。

  • 逐项检查81个文档新增约束及其相对链接:通过,81个链接目标均存在。

  • PR差异范围:仅docs目录下82个文档文件,不涉及实现代码。

  • asc_get_mask_spr文档完整示例:dav-3510编译通过,Ascend950PR上板验证通过,输出[Success] asc_get_mask_spr_b16 passed.,退出码0;全量比较256个uint16_t元素,两轮各自前32个元素为1,其余保持输入值。

  • 未运行单元测试、二级冒烟或算子泛化测试。

  • 本次5处功能说明差异格式和参数说明锚点检查通过;未改变实现、Padding和地址约束,未另行运行设备测试。

文档更新

更新docs/zh/api/SIMD-API/c_api下Cube搬运文档24个、Reg计算文档47个、Vector搬运文档11个,完善同步触发条件和同步接口引用,并修正asc_get_mask_spr调用示例。

补充统一asc_copy_gm2l1_align及asc_copy_gm2ub_align、asc_copy_ub2gm_align的2201/3510版本功能说明,区分数据长度与地址对齐。

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 lihuaichao 的贡献)
Llihuaichao成员
8 天前 创建了 pull request,commit 660621b7
CANN-robot
CANN-robot成员
8 天前 评论:

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 ✅ munanhw, Lycheeeee (2/2) ✅ munanhw (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
atomgit-bot
atomgit-bot
8 天前 评论:

变更摘要

本次变更为纯文档更新,聚焦完善 SIMD C API 的同步约束说明。原先文档仅要求「目的地址重叠」时进行同步,容易让用户误解为只有地址重叠才需要同步;本次将约束调整为基于「数据依赖」的场景描述,避免遗漏需要同步的情况。涉及 docs/zh/api/SIMD-API/c_api 目录下 Cube 搬运、Reg 计算、Vector 搬运三类接口文档,并统一链接至系统同步能力概述、明确使用 asc_mem_bar 完成同步。

主要改动

  • 同步约束语义调整: 将 Cube 搬运与 Vector 搬运文档中「仅目的地址重叠时才需同步」的要求统一改为数据依赖同步要求,并链接至系统同步能力概述。
  • Reg 计算接口约束完善: 针对 Reg 计算相关的搬入、搬出、scatter 及 squeeze 接口,补充数据依赖约束,明确同步接口使用 asc_mem_bar。
  • 文档同步接口引用统一: 在 Cube 搬运、Reg 计算、Vector 搬运文档中统一同步触发条件与同步接口引用,覆盖 Cube 搬运 24 个、Reg 计算 46 个、Vector 搬运 11 个 Markdown 文件。
  • 变更范围限定: 本次仅提交 docs 目录下的文档修改,不涉及实现代码,也不包含此前仅检查未修改的其他接口。
likedislike
不准确?
CANN-robotCANN-robot成员
8 天前 将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,munanhw,ai_xin,ascendhjh,hujiawen_kaven,wangxiaozhi,DragonBornHD84,louyuxuan,hyolee,yukangchen设为评审人
CANN-robotCANN-robot成员
8 天前 将bianque,munanhw,ai_xin,ascendhjh设为审查人
此处折叠了57条消息 查看更多
munanhw成员
7 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:lgtmapproved
CANN-robot
CANN-robot成员
7 天前 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
Llihuaichao成员
7 天前 解决了最后一个问题
CANN-robotCANN-robot成员
7 天前 合入了pull request