已合并
【qbmm】公共校验逻辑拆分与安全性增强 #6889
zhaoyingchao2创建于 7月2日
【qbmm】公共校验逻辑拆分与安全性增强 #6889
已合并
zhaoyingchao2创建于 7月2日
zhaoyingchao2成员
7月2日

描述

本 PR 针对 matmul/quant_batch_matmul_v3aclnnQuantMatmulV4 / QuantBatchMatmulV3 相关代码做整改:

  • 新增 op_api/quant_matmul_v4_common.h,沉淀 V4 参数校验中的常量、tuple 类型、A8W4/MX/TCG 场景判断、NZ K0 选择、对齐检查和 format 判断等公共逻辑。
  • aclnn_quant_matmul_v4.cpp 引入公共头文件并复用 quant_matmul_v4 命名空间,移除文件内重复定义,降低超大函数/超大文件维护成本。
  • 对公共判断函数补充 nullptr 防护,避免可选 scale/tensor 在场景识别中被直接解引用。
  • IS_BLAZE 宏定义前移到 quant_batch_matmul_v3_apt_tiling_key.h,统一 arch35 kernel 与 tiling key 对 Basic/Tensor API 路由的判断。
  • 补充 MX without-batch/tensor API 相关 tiling key 条件,并整理 arch35 kernel 分支代码格式。

关联的Issue

关联Issue #3813
https://gitcode.com/cann/ops-nn/issues/3813

测试

  • 已执行aclnn用例验证
  • 当前环境未执行 CANN/Ascend 编译和算子 ST,请以仓库 CI/pipeline 结果为准。

文档更新

无文档更新。

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhaoyingchao2 的贡献)
Zzhaoyingchao2成员
7月2日 创建了 pull request,commit 203fbb17
CANN-robotCANN-robot成员
7月2日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
7月2日 评论:

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
*/*/op_api/*.h 王永光, 杨阳 (2/2) 王永光 (1/1)
matmul 杨阳, 商晓波, 王子韬 (3/2) 杨阳, 商晓波 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
Zzhaoyingchao2成员
7月2日 update merge request[project id: 7665709, iid: 6889, commit_id: cb4996d73a9eeeef60b5dfd2fbd75cc1a45bf3e5] virtual merging success
Zzhaoyingchao2成员
7月2日 强制推送  1 个提交:609c6d91-code 整改
此处折叠了79条消息 查看更多
wangyongguang成员
7月4日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7月4日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
7月4日 关闭了关联的issue
CANN-robotCANN-robot成员
7月4日 合入了pull request
CANN-robot
CANN-robot成员
7月4日 评论:

Pull Request 已合并或已关闭。

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

likedislike