Pull Request has been successfully merged by CANN-robot.
(Thank you for 林泽辉's contribution.)变更摘要
本 PR 修复在 matmul/mat_mul_v3/op_host/op_tiling/arch35 下,不同 M 大小场景走 A 全载与单核切 K 时因模板选择不一致导致的结果差异。核心改动是将 MatMulV3BasicAswtTiling::CheckFp32SplitK 由执行副作用(直接改写 model_)的 void 函数改为 const bool 判定函数,并在 DoOpTiling 中依据其返回值决定是否设置 model_ = MatMulV3Model::BASIC_SPLIT_K;同时在 CheckAL1FullLoad 与 CheckBL1FullLoad 中新增一致性条件下不支持核内切 K 的判定,使 A/B 全载路径与单核切 K 模板选择在确定性场景下保持一致。
主要改动
CheckFp32SplitK改为纯判定接口: 函数签名由void CheckFp32SplitK()改为bool CheckFp32SplitK() const,去掉原有对model_的直接赋值,仅返回是否满足 FP32 切 K 条件。- 模型设置逻辑迁移到调用处: 在
DoOpTiling中改为if (CheckFp32SplitK()) { model_ = MatMulV3Model::BASIC_SPLIT_K; },由调用方统一决定模型,便于其他判定函数复用该结果。 CheckFp32SplitK判定条件放宽: 移除fullLoad_ == MatMulV3FullLoad::NONE_FULL_LOAD限制,仅保留非 slice、FP32、非 HF32、ND 格式及kValue达阈值等条件。- A 全载新增一致性约束:
CheckAL1FullLoad开头新增判定,当GetDeterministicLevel() > 1且满足CheckFp32SplitK()时直接返回false,即 batch 一致性下不支持 A 全载配合核内切 K。 - B 全载新增一致性约束并修正日志:
CheckBL1FullLoad同样在一致性条件下禁用 B 全载;同时将原有 cubeBound 场景日志文案由al1 full load更正为bl1 full load。


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


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!


/lgtm
/approve


/lgtm


描述
修改一致性条件下走入单核切k的条件
关联的Issue
https://gitcode.com/cann/ops-nn/issues/6123
测试
验证single_shape_vs_batched_shape: exact=True, neq=0/37888, max_abs=0.0000000000e+00, mean_abs=0.0000000000e+00, rmse=0.0000000000e+00, max_index=0
一致性已保证达成
文档更新
类型标签
AI/Agent生成声明