Pull Request has been successfully merged by CANN-robot.
(Thank you for cuijie's contribution.)变更摘要
本次变更统一并补齐了量化算子第一段接口的参数校验:将 aclnnAscendQuant / aclnnAscendQuantV3 中 roundMode 为空指针的判空逻辑前移至 CheckNotNull,使其返回 ACLNN_ERR_PARAM_NULLPTR(161001),与同族算子范式一致;同时在 aclnnGroupQuant 的 CheckDim 中新增对 scale 第 0 维为 0 的拦截,并收紧 offsetOptional 的空 Tensor 校验,避免错误下沉到 tiling 阶段。相关 UT 期望值与负向用例、以及对应算子文档同步更新。
主要改动
roundMode判空前移:aclnnAscendQuant与aclnnAscendQuantV3的CheckNotNull新增roundMode == nullptr校验并返回ACLNN_ERR_PARAM_NULLPTR,CheckRoundMode中原来的空指针分支被移除,仅保留取值合法性校验。aclnnGroupQuant新增scale第 0 维校验: 在CheckDim中新增scaleDim0 > 0的OP_CHECK,使scale第 0 维为 0 时第一段接口直接返回ACLNN_ERR_PARAM_INVALID(161002),不再下沉至 tiling。offsetOptional约束收紧: 由原来的ShapeSize <= 1收紧为ShapeSize == 1,拦截 shape 为[0]的空offset,并在报错信息中输出实际 shape。- UT 期望值与负向用例更新: 两个
roundMode=nullptr用例的期望由ACLNN_ERR_PARAM_INVALID改为ACLNN_ERR_PARAM_NULLPTR;group_quant新增空scale(shape[0,8])与空offset(shape[0])两个负向用例,均断言返回ACLNN_ERR_PARAM_INVALID。 - 文档同步:
aclnnAscendQuant.md/aclnnAscendQuantV3.md错误码表 161001 行补充roundMode空指针说明,aclnnGroupQuant.md将相关参数的“支持空 Tensor”改为“不支持空 Tensor”并注明scale第 0 维大小不支持为 0。


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 |
|---|---|---|
| */*/docs/acl*.md | ✅ 刘杰, 陈娇, 陈昊文 (3/2) | ✅ 陈娇 (1/1) |
| quant | ✅ 陈昊文, 刘杰 (2/2) | ✅ 刘杰, 陈昊文 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
cuijie25, thanks for your pull request. All authors of the commits have signed the CLA. 👍


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


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


/approve
/lgtm


/approve
/lgtm


/approve
/lgtm


/approve
/lgtm


描述
修复 issue #6272 与 #6298 指出的两个第一段接口参数校验问题:
关联的Issue
关联Issue #6272、#6298
测试
A2(Ascend 910B3 / CANN 9.1.0)实机验证:
文档更新
类型标签
AI/Agent生成声明