Merged
feat(basic_api): add OUT_TO_L1 loop mode support #6620
lihuaichaoAdd on Oct 9
feat(basic_api): add OUT_TO_L1 loop mode support #6620
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for lihuaichao's contribution.)Oct 9 Created pull request, commit 7bc3a36f
atomgit-bot
Oct 9 Comments:
Oct 9 Comments:
变更摘要
本 PR 为 basic_api 的 SetLoopModePara/ResetLoopModePara 增加 OUT_TO_L1 循环搬运模式支持。在公共分发逻辑中新增 OUT_TO_L1 分支,在 3510、m510(5102)、v516(5162)三个架构实现中补充该模式的参数校验、循环参数组装与寄存器配置,并在 InitSplitArchSpr 的 AIC 分支初始化 OUT_TO_L1 的 loop size。
主要改动
- 新增
OUT_TO_L1枚举类型: 在DataCopyMVType中新增OUT_TO_L1 = 2,为循环搬运模式提供新的目标类型区分。 - 新增
OUT_TO_L1参数组装实现: 在dav_3510、dav_m510、dav_v516的kernel_operator_data_copy_impl.h中新增SetLoopModeOutToL1ParaImpl,校验loop1Size/loop2Size/loopDstStride小于 2^21、loopSrcStride小于 2^40 且DstStride32B 对齐,并组装set_loop_size_outtol1、set_loop1_stride_outtol1、set_loop2_stride_outtol1寄存器参数。 - 新增
OUT_TO_L1复位实现: 同一批架构文件中新增ResetOutToL1LoopModeParaImpl,将loop_size_outtol1复位为硬件约定(1ul << 21) | 1ul的 normal 值。 - 公共分发逻辑扩展: 在
kernel_operator_data_copy_intf_impl.h中将SetLoopModePara/ResetLoopModePara的else分支改为显式else if,分别分发UB_TO_OUT、OUT_TO_UB、OUT_TO_L1三种类型。 - AIC 分支初始化: 在
kernel_utils_base.h的InitSplitArchSpr中,3510架构ASCEND_IS_AIC分支内新增对set_loop_size_outtol1的 loop size 初始化。


Incorrect?
atomgit-bot
Oct 9 Comments:
Oct 9 Comments:
Oct 9 Added label: cann-cla/yes
CANN-robot
Oct 9 Comments:
Oct 9 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 | ✅ munanhw, Lycheeeee, wuyang_hw (3/2) | ✅ munanhw (1/1) |
| impl/basic_api | ✅ wuyang_hw, Lycheeeee (2/2) | ✅ wuyang_hw (1/1) |
| impl/c_api | ✅ Lycheeeee, wuyang_hw (2/2) | ✅ Lycheeeee (1/1) |
| include/basic_api | ✅ Lycheeeee, wuyang_hw, wuzhaolin (3/2) | ✅ wuzhaolin (1/1) |
| include/c_api | ✅ wuzhaolin, Lycheeeee, wuyang_hw (3/2) | ✅ wuzhaolin (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies 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. 👍


148 messages are collapsed here。 See more
CANN-robot
13 days ago Comments:
13 days ago Comments:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


13 days ago Added label: ci-pipeline-running
13 days ago Removed label: ci-pipeline-running
13 days ago Added label: ci-pipeline-passed
13 days ago Merged pull request
描述
为 basic_api 的 SetLoopModePara/ResetLoopModePara 增加 OUT_TO_L1 支持,覆盖 3510、5102、5162、9201 实现,并修正 loop2Size 的 22 位范围。
将 C API 的 SoC 初始化拆分为 asc_init 与 asc_init_impl,在 reg-base 下按 3510、9201、9202 独立实现;2201 使用 memory-base 实现。基础 API 在这四种架构上复用 asc_init,基础 API 自身负责 g_deqValue 初始化。3510 配置 set_st_atomic_cfg,9201/9202 不配置;AIC 初始化 OUT_TO_L1 普通搬运模式。补齐 5162 初始化分支并跳过其 set_atomic_none。
GM→L1 样例及中英文说明的修改仅保留在本地,不包含在本 PR 中。
补齐 9201 的 OUT_TO_L1 配置与复位实现,包含 AIC 保护和参数校验。初始化公共头改用轻量宏依赖,移除 2201 初始化对 memory-base utils 的依赖,不再间接引入全量 C API Vector 类型;未显式添加。
关联的Issue
无。
测试
文档更新
更新 SetLoopModePara、ResetLoopModePara、asc_set_ub2gm_loop_size API 文档。
类型标签