Merged
docs(pow): 纠正公式、参数及非连续输出标注 #6338
zhang-song-ruiAdd on 27 days ago
docs(pow): 纠正公式、参数及非连续输出标注 #6338
Merged
zhang-song-ruiAdd on 27 days ago
zhang-song-rui
zhang-song-ruiCollaborators
27 days ago

描述

修正 Pow 现有接口资料中与参数角色、函数原型及实现不一致的表述:

  • 将 aclnnPowTensorScalar 的 out 非连续 Tensor 列由 - 改为 √,与 ViewCopy 写回行为一致;修正标量 exponent 的公式下标。
  • 修正 aclnnPowScalarTensor 的标量底数公式、功能描述,以及 out 参数缺少 const 的类型标注。
  • 将 aclnnPowTensorTensor 头文件注释中不存在的参数名 other 改为 exponent。
  • 修正 Pow IR 的类型注释,准确描述两个输入的 dtype 可不同、输出按 Promote 推导。

关联的Issue

Closes #3565

关联文档纠错 Issue:https://gitcode.com/cann/ops-math/issues/3565

对应已确认的 Pow 扫描问题 DOC.02/1、DOC.05/1、DOC.07/1(task 289)及 GEIR.11/1。

测试

  • git diff --check 通过。
  • 核对标量公式、const 参数类型及非连续输出标记与源码一致。
  • 去除注释及空白后对比头文件,接口声明与注册代码一致。
  • 确认 README、Exp2 文档和 TensorTensor Markdown 文档与 PR 基线一致。
  • PR 保持为一笔提交。

文档更新

修改 ScalarTensor、TensorScalar 两份 ACLNN 文档,以及 aclnn_pow_tensor_tensor.h、pow_proto.h 的注释。本次不增加空 Tensor、动态 shape/rank 等能力说明,也不补充 README 导航、维度约束及错误码条目。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for zhang-song-rui's contribution.)
zhang-song-ruizhang-song-ruiCollaborators
27 days ago Created pull request, commit 9bec1eb9
atomgit-bot
atomgit-bot
27 days ago Comments:

变更摘要

本改动主要围绕 Pow 系列算子接口的文档注释与数据类型约束说明进行修正:在 math/pow/op_api/aclnn_pow_tensor_tensor.h 中统一了 aclnnPowTensorTensor 的入参命名与推导关系描述,并扩充了输出支持的数据类型;在 math/pow/op_graph/pow_proto.h 中修正了 Pow 原型对两个输入与输出 dtype 关系的描述。整体体现为对接口文档中数据类型/推导规则的澄清,未在补丁中体现计算逻辑本身的调整。

主要改动

  • aclnnPowTensorTensor 入参命名与推导描述修正: 在 aclnn_pow_tensor_tensor.h 中将 self 参数字段的 other 统一改为 exponent,并将数据类型、broadcast 与数据格式的描述改为与 exponent 构成对应关系。
  • 输出数据类型支持范围扩充: 同一文件的 out 参数说明在原有类型基础上新增 UINT16、UINT32、UINT64,并将输出 dtype 与 shape 的推导来源由 self 与 other 更正为 self 与 exponent。
  • Pow 原型输入 dtype 约束放宽: 在 pow_proto.h 中把 x2 由「与 x1 相同 dtype」改为支持与 x1 相同的 dtype 集合且 dtype 可与 x1 不同。
  • Pow 原型输出 dtype 规则更新: 将输出 y 由「与 x1 相同 dtype」改为由 x1 与 x2 的 dtype 提升(promotion)推导得到。

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

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

代码审查

✅ 未发现问题


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

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
27 days ago Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
27 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
27 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 ✅ 陈娇, 王瑞, 杜慧萍 (3/2) ✅ 陈娇 (1/1)
*/*/op_api/*.h ✅ 汤磊, 王瑞 (2/2) ✅ 汤磊 (1/1)
*/*/op_graph/*_proto.h ✅ 汤磊, 王瑞 (2/2) ✅ 汤磊 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

zhang-song-rui, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
27 days ago Set FelixTang7,yue-ma,zhou-qilong,gitee-duhuiping,wangrui_,rxtfeng,loov1,tang-lei01,zhangzijie,jia0liang,zl_hw,songkai111,gitcode-chenjiao,chenxingyu18,pingchuantang,llimwang,gubaocheng,andong_hw,wangyongguang,fengying555682,xuejinghui,zhanw_coding,clinglai0517,caiwenwen,yanglu-1 as approver
5 event messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
27 days ago Removed label: stat/needs-squash
CANN-robot
CANN-robotCollaborators
27 days ago Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): stat/needs-squash.

likedislike
CANN-robotCANN-robotCollaborators
27 days ago Added label: cann-cla/yes
9 event messages are collapsed here。 See more
zhang-song-ruizhang-song-ruiCollaborators
27 days ago Modify description of pull request
zhang-song-rui
zhang-song-ruiCollaborators
27 days ago Comments:

/compile

likedislike
zhang-song-ruizhang-song-ruiCollaborators
27 days ago Pre merge succeeded (commit_id: a62fd68cc9238e0e28177a21f77b604439bb5c00)
CANN-robot
CANN-robotCollaborators
27 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
27 days ago Added label: ci-pipeline-running
chenjiaoCollaborators
27 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
27 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
27 days ago Added label: ci-pipeline-passed
RuiWang_Collaborators
27 days ago Comments:

/lgtm
/approve

likedislike
gitee-duhuipingCollaborators
27 days ago Comments:

/lgtm

likedislike
tang-lei01Collaborators
27 days ago Comments:

/approve

likedislike
CANN-robot
CANN-robotCollaborators
27 days ago Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: 王瑞

likedislike
CANN-robotCANN-robotCollaborators
27 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
27 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
27 days ago Merged pull request