Pull Request已成功合入, 合并人@CANN-robot
(感谢 void_ptr 的贡献)变更摘要
本 PR 为 Ascend950 新增了块级与内核级的 SYRK 实现(Y = X * X^T),仅支持下三角计算。块级新增 BlockMmadSyrkTla,其布局标签由算子约定固定(X 为 RowMajor [M, K]、Xt 为 ColumnMajor [K, M] 的同一 GM 缓冲转置视图、Y 为 RowMajor [M, M]),派发策略固定为 MmadPingpong<Ascend950, false>(关闭 unitFlag、HF32 与 L1-resident),并采用双写策略:对角块通过 nz2nd 写一次,下三角块通过 nz2nd 与 nz2dn(转置)各写一次,L0C→GM 的同步统一使用 M_FIX。内核级新增 BasicSyrkTla,按调度规则仅处理下三角块(m < n 跳过、m == n 计算并写一次、m > n 计算并双写),并在 copy_l0c_to_gm.hpp 中为 CopyL0CToGmTla 增加 ColumnMajor 目标布局(nz2dn)的特化以支撑双写。改动为纯新增,未删除任何既有代码。
主要改动
- 新增块级 SYRK 实现
BlockMmadSyrkTla:在include/catlass/gemm/block/block_mmad_syrk_tla.hpp中新增约 390 行,实现Y = X * X^T的 L1→L0→mmad→L0C 流水与双 GM 写回(对角块nz2nd写一次,非对角块nz2nd+nz2dn双写),并通过static_assert固定布局标签、Ascend950-only、关闭unitFlag/HF32/L1-resident 等约束。 - 新增内核级 SYRK 调度
BasicSyrkTla:在include/catlass/gemm/kernel/basic_syrk_tla.hpp中新增约 192 行,提供Params/Arguments/ToUnderlyingArguments接口,按块坐标执行"下三角跳过、对角单写、下三角双写"的调度规则,并限定CanImplement要求M == N。 - 扩展
CopyL0CToGmTla支持 ColumnMajor 目标(nz2dn):在include/catlass/gemm/tile/ascend950/copy_l0c_to_gm.hpp中为 Ascend950 新增LayoutDst_为 ColumnMajor 的特化,构造FixpipeParamsC310<COLUMN_MAJOR>并调用AscendC::Fixpipe以支持 SYRK 双写的转置落盘。 - 注册新块级头文件:在
include/catlass/gemm/block/block_mmad.hpp的条件编译块中新增#include "catlass/gemm/block/block_mmad_syrk_tla.hpp",使新实现随BlockPrologue一起编译。


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


/lgtm


/lgtm
/approve


描述
BasicSyrkTlato handle scheduling and execution of SYRK operations.block_mmad.hppto include the new SYRK implementation.CopyL0CToGmTlato support storing transposed results in a ColumnMajor format.关联的Issue
https://gitcode.com/cann/catlass/issues/489
原因
测试
文档更新
类型标签