已合并
feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization #1124
feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization #1124
已合并
CheaterAbec创建于 12 天前
CheaterAbec
CheaterAbec成员
12 天前

Summary

  • 仅在 include/catlass/gemm/tile/ascend950/copy_l0c_to_ub.hpp 新增 Ascend950 L0C→UB ColumnMajor(nz2dn)特化及 CFG_COLUMN_MAJOR_UB

原因

CATLASS DSL dma.cpp 注册了 ColumnMajor L0C→UB 通路,master 头文件原先缺少对应偏特化。

测试

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 CheaterAbec 的贡献)
CheaterAbecCheaterAbec成员
12 天前 创建了 pull request,commit e06f7340
atomgit-bot
atomgit-bot
12 天前 评论:

变更摘要

本 PR 将 DSL 侧分叉的 C++ tile 语义改动单独合入 master(与 DSL Python 合入 PR 拆分),为 Ascend950 补充对齐 zN→zN 的 UB→L1 拷贝特化,以及 L0C→UB 的 ColumnMajor(nz2dn)通路,使 python/tla_dsl 的 bitcode 依赖(如 CopyL0CToUBTla 的 ColumnMajor specialization)可以正常编译。

主要改动

  • 新增 CopyUb2L1Tla 的 aligned zN→zN 特化:在 copy_ub_to_l1_tla.hpp 中为 Arch::Ascend950 增加源、目的均为 zN 布局(以 iszN 约束)的新偏特化,与原 iszNUnAlign 特化并存,补齐 zN 对齐拷贝通路,并以 tla::get<0> 替代 tla::get<0, 0>srcShape
  • 新增 CFG_COLUMN_MAJOR_UB 配置:在 copy_l0c_to_ub.hpp 中为 __NPU_ARCH__ == 3510 增加 AscendC::CO2Layout::COLUMN_MAJORFixpipeConfig 常量。
  • 新增 CopyL0CToUBTla 的 ColumnMajor 特化:为 CopyL0CToUBMode::NO_SPLIT 增加以 isColumnMajor 约束的特化,使用 FixpipeParamsC310<CO2Layout::COLUMN_MAJOR>Nz2DnParams(1, 0, 0, 1)srcNzC0Stride=1)实现 nz2dn 转换,mSizeELE_NUM_PER_BLK 向上取整,并提供普通与 subBlockId 两个重载。
  • RowMajor 特化的 nSize 计算调整:现有 RowMajor 特化中 intriParams.nSize 由按 ELE_NUM_PER_BLK 向上取整改为直接取 tla::get<1>(dstTensor.originShape()),同时删除基于 BytesToBits/SizeOfBitsELE_NUM_PER_BLK 常量定义及 catlass/numeric_size.hpp 头文件引用,并修正若干注释。
likedislike
atomgit-bot
atomgit-bot
12 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
12 天前 评论:

CLA Signature Pass

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

likedislike
此处折叠了90条消息 查看更多
CANN-robotCANN-robot成员
12 天前 添加了label:approved
yuantao
yuantao成员
12 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:lgtm
CANN-robotCANN-robot成员
12 天前 合入了pull request
CANN-robot
CANN-robot成员
12 天前 评论:

Pull Request 已合并或已关闭。

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

likedislike