Merged
fix(ones_like): support UINT16 on A2 and A3 #7149
fix(ones_like): support UINT16 on A2 and A3 #7149
Merged
weikeAdd on 14 days ago
weike
weikeCollaborators
14 days ago

描述

资料第 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

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for weike's contribution.)
weikeweikeCollaborators
14 days ago Created pull request, commit 0f48c9a3
atomgit-bot
atomgit-bot
14 days ago Comments:

变更摘要

本 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:

likedislike
Incorrect?
atomgit-bot
atomgit-bot
14 days ago Comments:

代码审查

✅ 未发现问题


🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
14 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
14 days ago 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/acl*.md ✅ 杨露, 顾宝成, 汤平川, yue-ma (4/2) ✅ 杨露 (1/1)
math/ones_like ✅ yue-ma, 顾宝成, 汤平川 (3/2) ✅ yue-ma, 顾宝成, 汤平川 (3/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
CANN-robotCANN-robotCollaborators
14 days ago Set FelixTang7,yue-ma,zhou-qilong,gitee-duhuiping,wangrui_,rxtfeng,loov1,zhangzijie,jia0liang,zl_hw,songkai111,gitcode-chenjiao,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,fengying555682,xuejinghui,onanfield,zhanw_coding,jiangjiawei,clinglai0517,caiwenwen,yanglu-1 as approver
CANN-robotCANN-robotCollaborators
14 days ago Set FelixTang7,yue-ma,zhou-qilong,gitee-duhuiping,wangrui_,rxtfeng,loov1,zhangzijie,zl_hw,songkai111,gitcode-chenjiao,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,fengying555682,xuejinghui,onanfield,zhanw_coding,jiangjiawei,clinglai0517,caiwenwen,yanglu-1 as approver
weike
weikeCollaborators
14 days ago Comments:

compile

likedislike
weikeweikeCollaborators
14 days ago Pre merge succeeded (commit_id: 6ada2c5d24a4d7bff67d564aa1721abc828884ca)
CANN-robot
CANN-robotCollaborators
14 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
14 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
14 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
14 days ago Added label: ci-pipeline-passed
gubaochengCollaborators
14 days ago Comments:

/lgtm
/approve
by agent

likedislike
weikeweikeCollaborators
14 days ago Modify description of pull request
weikeweikeCollaborators
14 days ago Modify description of pull request
chenyifengCollaborators
14 days ago Comments:

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

likedislike
weikeweikeCollaborators
3 days ago Modify description of pull request
weikeweikeCollaborators
3 days ago Modify description of pull request
weikeweikeCollaborators
2 days ago Modify description of pull request
weike
weikeCollaborators
2 days ago Comments:
likedislike
TangPC
TangPCCollaborators
2 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
2 days ago Added label: lgtm
weikeweikeCollaborators
2 days ago Set as a draft.
weikeweikeCollaborators
1 day ago Draft state has been cancelled
yue-maCollaborators
1 day ago Comments:

/lgtm
/approve

likedislike
yanglu-1Collaborators
1 day ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
1 day ago Added label: approved
CANN-robotCANN-robotCollaborators
1 day ago Removed label: ci-pipeline-passed
CANN-robot
CANN-robotCollaborators
1 day ago Comments:

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.

likedislike
weike
weikeCollaborators
1 day ago Comments:

compile

likedislike
weikeweikeCollaborators
1 day ago Pre merge succeeded (commit_id: 6e52b10622a94f62f7c0476df20c85d9b3d4c08e)
CANN-robot
CANN-robotCollaborators
1 day ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
1 day ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
1 day ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
1 day ago Added label: ci-pipeline-passed
CANN-robotCANN-robotCollaborators
1 day ago Merged pull request