Pull Request has been successfully merged by CANN-robot.
(Thank you for zhoushaolong's contribution.)变更摘要
本 PR 针对 Blaze GEMM 中 GM 到 L1 的拷贝路径,将 L2 cache 模式参数由原始整型/uint8_t 改为强类型的 asc_load_l2_cache_mode 枚举,使 asc_copy_gm2l1_nd2nz、asc_copy_gm2l1_dn2nz 等 DMA 拷贝接口的调用与底层签名保持一致。改动集中在 include/blaze/gemm/tile/arch35/copy_gm_to_l1.h,涉及 CopyConcatGM2L1 的 cache 模式获取及多处 arch35 平台下的拷贝调用。
主要改动
- ND2NZ 拷贝接口参数类型化:在
arch35平台的两处asc_copy_gm2l1_nd2nz调用中,将cacheMode由隐式整型传参改为static_cast<asc_load_l2_cache_mode>(cacheMode),使 L2 cache 模式以明确枚举类型传入。 - DN2NZ 拷贝接口参数类型化:
asc_copy_gm2l1_dn2nz调用同样改为先将cacheMode转换为asc_load_l2_cache_mode再传入,保持两类拷贝路径的 cache 模式处理一致。 - 缓存模式取值类型收敛:在
CopyConcatGM2L1中获取 cache 模式时,不再声明为uint8_t,而是使用auto并直接static_cast<asc_load_l2_cache_mode>(src.engine().get_cache_mode()),从源头统一为类型化枚举,避免后续调用处重复或隐式的类型转换。


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


/lgtm
/approve


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.


描述
修复
include/blaze/gemm/tile/arch35/copy_gm_to_l1.h中 GM 到 L1 拷贝的 cache mode 参数类型,使调用显式匹配asc_load_l2_cache_mode接口。asc_copy_gm2l1_nd2nz调用将 cache mode 显式转换为asc_load_l2_cache_mode。CopyConcatGM2L1的 NZ/ZN 权重对齐快速路径,将src.engine().get_cache_mode()的结果转换为该枚举,供后续asc_copy_gm2l1_align调用使用,替代原uint8_t局部变量。asc_copy_gm2l1_dn2nz调用同样显式转换为枚举类型。仅调整四处参数类型表达;cache mode 的来源、拷贝地址、尺寸、布局及步长不变,未新增算子功能或修改 tiling。
关联的Issue
关联 Issue #326:https://gitcode.com/cann/ops-tensor/issues/326
测试
已核对提交
49c814e2af9be656c2718c8e49f1847b1dc12b04的完整 diff:仅一个头文件变更(+7/-4)。本次未执行编译、UT、设备精度或性能测试,PR 未新增测试用例。不将其他提交或既有验证材料的结果作为本提交已验证的结论;仍需在目标 CANN 头文件环境下编译并回归相关 GM 到 L1 拷贝路径。
文档更新
本次未修改文档。
类型标签