已合并
adapt: upgrade 3rdparty catlass to v1.5.0 #2182
adapt: upgrade 3rdparty catlass to v1.5.0 #2182
已合并
dovahkiiin创建于 21 天前
dovahkiiin成员
21 天前

描述

  • 3rdparty/catlass 拉取版本从 v1.4.0 升级到 v1.5.0scripts/build.sh / scripts/release.sh
  • 本地扩展 BlockMmad ResidentA 对齐上游新增的 tile-shape 静态检查

Test plan

  • bash scripts/build.sh default 全量编译通过
  • MmDeqSwigluQuantMmDeqOperation 精度用例 3/3 通过(m=32/256/576)
  • GmmDeqSwigluQuantGmmDeqOperation 精度用例 3/3 通过
  • LinearOperation FP32(MoeGateCorr 路径)m=1..256 通过

checklist

  • 是否通过本地IDE对代码进行静态检查
  • 是否通过本地IDE对代码进行格式化处理
  • 是否进行空指针校验
  • 是否进行返回值校验
  • 是否正确释放new/malloc申请的内存
  • 是否充分考虑接口的异常场景
  • 是否正确记录错误日志
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 dovahkiiin 的贡献)
atomgit-bot
atomgit-bot
21 天前 评论:

变更摘要

此 PR 将第三方依赖 catlassv1.4.0 升级至 v1.5.0,主要涉及构建脚本中的版本号更新、为 mki 的 compile_ascendc.py 自动注入 CATLASS_ARCH 宏以确保 tile-copy 按平台正确选择,以及在 BlockMmad 驻留 A 实现中新增上游要求的 tile-shape 静态编译期检查。

主要改动

  • catlass 版本升级:在 scripts/build.shscripts/release.sh 中将 catlass 的拉取分支由 v1.4.0 更新为 v1.5.0
  • 自动注入 CATLASS_ARCH:在 build.shrelease.sh 中新增 fn_patch_compile_ascendc_for_catlass 函数,在构建流程中检查 3rdparty/mki/scripts/compile_ascendc.py 是否已包含 CATLASS_ARCH 定义,若缺失则根据目标 SoC(A2/A3 对应 2201,Ascend950 对应 3510)自动注入编译选项,保证 catlass >= 1.2 的 tile-copy 实现按平台正确选择。
  • Tile-Shape 静态检查:在 block_mmad_preload_async_with_callback_resident_a.h 中新增两条 static_assert:约束 L0TileShape::K <= L1TileShape::K,以及通过 TileShapeAlignChecker 校验 tile shape 需满足 32B(256b)对齐,与上游 catlass v1.5.0 新增的静态检查对齐。
likedislike
atomgit-bot
atomgit-bot
21 天前 评论:

代码审查

审查总结

文件 审查结果
scripts/build.sh 1 个 P3 问题(Python needle 唯一性校验)
scripts/release.sh 1 个 P3 问题(同上,相同根因)
src/kernels/mixkernels/utils/common/kernel/catlass/gemm/block/block_mmad_preload_async_with_callback_resident_a.h 无问题

统计: P0: 0, P1: 0, P2: 0, P3: 2

整体风险评估: 低风险。catlass 版本升级(v1.4.0 → v1.5.0)本身是一个直接依赖更新;C++ 头文件中新增的两个 static_assert 是正确的编译期约束对齐;Shell 补丁函数的 Python 内联脚本存在一个轻微的健壮性缺陷(needle 未校验唯一性),但由于匹配模式非常特定(精确缩进 + 特定变量名),实际触发概率极低,仅建议改进。构建流程中补丁的调用顺序(mki 构建 → catlass 克隆 → 补丁注入 → 主项目编译)逻辑正确。

⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。

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

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


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/ascend-transformer-boost 尹祺然, goodpeople233 (2/2) 尹祺然 (1/1)
src 尹祺然, goodpeople233 (2/2) 尹祺然 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
此处折叠了63条消息 查看更多
CANN-robotCANN-robot成员
17 天前 添加了label:lgtm
CANN-robotCANN-robot成员
17 天前 关闭了关联的issue
CANN-robotCANN-robot成员
17 天前 合入了pull request
dovahkiiin成员
17 天前 评论:

/check-pr

likedislike
CANN-robot
CANN-robot成员
17 天前 评论:

Pull Request 已合并或已关闭。

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

likedislike