Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhywang 的贡献)变更摘要
本 PR 回退提交 7e58ace4b2d44f792486199f64118e5096bf03ba,撤销 A5 上「UB 到 L1 的 ND-to-NZ」搬运能力以及配套的 A2A3 路径守卫。核心是删除 include/pto/npu/a5/TExtractCommon.hpp 中的 TCopyNdToNzUbToMat 模板实现,并让 TEXTRACT、TMOV、TINSERT 在 A5 上重新统一走 TExtractVecToMat 路径;同时在 A2A3 侧恢复原有的 static_assert 校验分支,并移除随之引入的一整套测试用例与辅助头文件。
主要改动
- 移除 UB-to-L1 ND-to-NZ 核心实现: 从
include/pto/npu/a5/TExtractCommon.hpp删除#if defined(PTO_NPU_ARCH_A5)包裹的TCopyNdToNzUbToMat函数,该函数此前负责 NDVec源到非紧凑 NZ512Mat目标的copy_ubuf_to_cbuf分块搬运。 - A5 三个算子回退到原路径:
TEXTRACT_TILE_IMPL(include/pto/npu/a5/TExtract.hpp)、TMOV_TILE_IMPL(include/pto/npu/a5/TMov.hpp)和TInsertVecToMatImpl(include/pto/npu/a5/TInsert.hpp)均删除 ND-to-NZ 分支及相关PTO_ASSERT形状检查,统一改回调用TExtractVecToMat;TInsert.hpp同时移除对TExtractCommon.hpp的条件包含。 - 恢复 A2A3 路径守卫:
include/pto/npu/a2a3/TExtract.hpp重新加入static_assert(sizeof(DstTileData) == 0, ...)的不支持组合报错,并将 Vec->Vec 的 ND 分派条件恢复为同时要求SFractal == SLayout::NoneBox,其余情况改用isRowMajor与SFractal匹配的static_assert提示。 - 删除 UB2L1 ND2NZ 测试支撑文件: 移除
tests/npu/a5/src/st/testcase/tmov_ub2l1/下的ub2l1_nd2nz_kernel.h、ub2l1_nd2nz_test.h、ub2l1_nd2nz_types.h及nd2nz_cases.h,并删除各测试目录下同名的nd2nz_cases.h与 kernel 中的LAUNCH_ND2NZ/TEST_ND2NZ宏展开。 - 清理测试用例与设备参数处理:
tests/npu/a5/src/st/testcase/textract/main.cpp、tinsert/main.cpp、tmov_ub2l1/main.cpp移除对应的 ND-to-NZ 测试与引入头文件,tmov_ub2l1恢复为固定aclrtSetDevice(0);tests/costmodel/st/testcase/textract/main.cpp重写为基于EXPECT_CYCLE_NEAR的Mat类型用例,并删除tests/cpu/st/testcase/tmov/main.cpp中的testUbToL1Nd2Nz系列测试。


🤖 AI 代码检视正在进行中,请稍候…


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 | ✅ zhangjian_hz11, Zhanghaijian (2/2) | ✅ zhangjian_hz11 (1/1) |
| repo-cann/pto-isa | ✅ zhangjian_hz11, Zhanghaijian (2/2) | ✅ zhangjian_hz11, Zhanghaijian (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhhywang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/approve


/approve


/lgtm


This reverts commit 7e58ace4b2d44f792486199f64118e5096bf03ba.