Merged
fix(operation): Restrict LogicalNot integer dtypes to A5 #5885
bynshardAdd on Sep 3
fix(operation): Restrict LogicalNot integer dtypes to A5 #5885
Merged
Merged frombynshard/pyptofix-LogicalNotintocann/pyptomaster
Pull Request has been successfully merged by CANN-robot.
(Thank you for bynshard's contribution.)atomgit-bot
Sep 3 Comments:
Sep 3 Comments:
变更摘要
本 PR 针对 LogicalNot 算子的数据类型支持做架构限制修复:由于 A2/A3 架构的 TMINS 与 TGATHER 指令不支持整数实现所需的数据类型,将 DT_INT16、DT_UINT16、DT_INT32、DT_UINT32 的支持从 A2/A3 集合中移除,仅保留在 A5 架构(LogicalNot 的 LOGICALNOT_A2A3_TYPES 与 LOGICALNOT_A5_TYPES 分别定义),并同步更新接口文档与新增按架构区分的单元测试。
主要改动
- 收紧
logical.cpp中 A2/A3 支持的整数类型:从LOGICALNOT_A2A3_TYPES中删除DT_INT16、DT_INT32、DT_UINT16、DT_UINT32,仅保留DT_FP32、DT_FP16、DT_UINT8、DT_INT8、DT_BOOL、DT_BF16;LOGICALNOT_A5_TYPES仍保留上述整数类型及DT_INT64,使 16/32 位整数输入在 A2/A3 上执行LogicalNot时被CheckTensorDataType拦截。 - 更新
LogicalNot_UnsupportedDataType测试:测试前将 NPU 架构设为NPUArch::DAV_2201(A2),验证DT_INT32输入抛出异常,用例结束后复位为NPUArch::DAV_UNKNOWN。 - 新增
LogicalNot_A5SupportedDataType测试:将架构设为NPUArch::DAV_3510(A5),验证DT_UINT32输入调用LogicalNot不再抛出异常,并复位架构状态。 - 更新 LogicalNot 文档:按 PR 描述明确 A2/A3 与 A5 架构各自支持的数据类型范围,与本次代码层面的限制保持一致。


Incorrect?
atomgit-bot
Sep 3 Comments:
Sep 3 Comments:
Sep 3 Added label: cann-cla/yes
CANN-robot
Sep 3 Comments:
Sep 3 Comments:
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 | ✅ 尹杰, lyz0328, 林嘉树 (3/2) | ✅ 尹杰, lyz0328 (2/1) |
| framework/src/interface/operation | ✅ 尹杰, 林嘉树 (2/2) | ✅ 尹杰 (1/1) |
| framework/src/interface/tileop/vector | ✅ 尹杰, 林嘉树 (2/2) | ✅ 尹杰 (1/1) |
| repo-cann/pypto | ✅ 尹杰, 林嘉树 (2/2) | ✅ 尹杰 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
bynshard, thanks for your pull request. All authors of the commits have signed the CLA. 👍


75 messages are collapsed here。 See more
lyz0328
Sep 4 Comments:
Sep 4 Comments:
/approve


linjiashu
Sep 4 Comments:
Sep 4 Comments:
/lgtm


Jie Yin
Sep 4 Comments:
Sep 4 Comments:
/approve


Sep 4 Added label: lgtmapproved
Sep 4 Merged pull request
由于 A2/A3 的 TMINS 和 TGATHER 指令不支持当前整数实现所需的数据类型,
将 LogicalNot 的 DT_INT16、DT_UINT16、DT_INT32 和 DT_UINT32 支持限制为仅适用于 A5 架构。
更新 LogicalNot 文档,明确 A2/A3 与 A5 支持的数据类型,并新增架构相关的校验测试。
Related Issue: #3207
更多描述信息见:Commit Message 规范