Pull Request has been successfully merged by CANN-robot.
(Thank you for weike's contribution.)变更摘要
本 PR 为 ones_like 算子接口补充 UINT16 数据类型支持,目标平台为 A2(ASCEND910B)与 A3(ASCEND910_93)。核心做法是在 aclnn_ones.cpp 的平台数据类型支持列表中加入 op::DataType::DT_UINT16,并通过新增单元测试验证两种芯片版本下 aclnnInplaceOne 在 UINT16 输入上的 TestGetWorkspaceSize 调用可成功返回 ACLNN_SUCCESS。
主要改动
- A2 数据类型支持列表扩展: 在
aclnn_ones.cpp的ASCEND910B_DTYPE_SUPPORT_LIST中新增op::DataType::DT_UINT16,使UINT16沿既有 AICPU 路径被纳入支持范围,同时调整列表换行对齐。 - A2
UINT16接口用例: 在test_aclnn_ones_like.cpp中新增ascend910b_l2_ones_test_dtype_uint16,以SocVersion::ASCEND910B和ACL_UINT16的{2, 3}张量调用aclnnInplaceOne,期望返回ACLNN_SUCCESS。 - A3
UINT16接口用例: 新增ascend910_93_l2_ones_test_dtype_uint16,以SocVersion::ASCEND910_93覆盖同一接口场景,确认 A3 平台对UINT16的支持行为一致。
说明:本 PR 共涉及 4 个文件,上述摘要基于提供的
aclnn_ones.cpp与test_aclnn_ones_like.cpp补丁内容;其余两个文件的改动内容未在材料中给出,故不作推断。
🧩 本次 Review 已使用自定义 Skill:




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 | ✅ 杨露, 顾宝成, 汤平川, yue-ma (4/2) | ✅ 杨露 (1/1) |
| math/ones_like | ✅ yue-ma, 顾宝成, 汤平川 (3/2) | ✅ yue-ma, 顾宝成, 汤平川 (3/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
m0_55003149, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


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


/lgtm
/approve
by agent


您好,PR已满足合入指标,请尽快联系Committer进行合入。如暂时不需要合入,请在PR标题前加[WIP]


/lgtm
/approve


The following label is not ready.
ci-pipeline-passed: The ci-pipeline-passed label is expired as added over 72 hours. Please use /compile to recompile.


compile


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


描述
资料第 78 行声明 dtype 含 UINT16,math/ones_like/op_kernel_aicpu/ones_like_aicpu.cpp: 也已实现了 uint16,但接口层白名单缺失。
在 ASCEND910B_DTYPE_SUPPORT_LIST 中加入 DT_UINT16,覆盖 A2/A3。
关联的Issue
https://gitcode.com/cann/ops-math/issues/4284
测试
UT:53/53 pass
ST:46/46 pass
文档更新
math/ones_like/docs/aclnnInplaceOne.md
math/ones_like/docs/aclnnInplaceOne_en.md
类型标签