Closed
【docs】修正原生API数据类型说明的参数归属及多Tensor输入标注 #4768
chenrayrayAdd on  Sep 14Closed at  Sep 29
chenrayray
chenrayrayCollaborators
Sep 14 Create

问题描述

master原生API文档中,部分数据类型说明标注的参数名与接口实际入参不一致,例如将初始化接口的tensor、矩阵分解接口的A、CTC Loss的log_probs写成input。部分多Tensor接口仅标注了一个输入,未明确现有类型限制适用于哪些参数。

涉及PyTorch 2.7.1、2.11.0、2.12.0、2.13.0原生API文档。

预期修改

  • 按API主要Tensor入参修正参数名,统一使用“参数名仅支持……”的简洁表述。
  • 沿torch_npu/op-plugin实际调用链查阅算子文档,确认多Tensor参数是否适用同一类型列表;标签、索引、掩码及用户回调相关参数分别处理。
  • 以当前API文档已有dtype列表为准,不因算子支持范围更广而扩大API支持度,保留各版本差异及其他约束。

验收标准

  • 修正73个API的296处参数归属,其中17个API补齐多Tensor参数名。
  • 各版本现有dtype列表、产品支持范围及其他约束保持不变。
  • 参数归属有实现和算子文档依据,文档差异检查通过。

关联PR

PR #46150:修正原生API数据类型说明对应的Tensor入参

likedislike
TorchNPU-BotTorchNPU-BotCollaborators
Sep 14 Added label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 14 Comments:

issue待分派,添加triage-review标签

likedislike
chenrayraychenrayrayCollaborators
Sep 14 Associated pull request
TorchNPU-BotTorchNPU-BotCollaborators
Sep 14 Added label: bot-triaged; Removed label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 14 Comments:

检测到当前 issue 已关联 PR,自动添加标签:bot-triaged

likedislike
chenrayraychenrayrayCollaborators
Sep 14 Associated pull request
chenrayraychenrayrayCollaborators
Sep 24 Associated milestone: v26.2.0
chenrayray
chenrayrayCollaborators
Sep 29 Comments:

因为本单相关实施 PR 已全部结束(2 个已合入、0 个已关闭),按照本轮 issue 整理规则,先关闭此单。

核对的 PR:

如仍有问题或需要继续推进,请重新打开,并补充当前 PyTorch / TorchNPU / CANN 版本、硬件环境、复现步骤及相关日志;需求类请补充尚未完成的具体内容。

likedislike
chenrayraychenrayrayCollaborators
Sep 29 Close issue
chenrayraychenrayrayCollaborators
Sep 29 changed custom state from TODO to DONE
ascend-robotascend-robotCollaborators
Sep 29 Added label: resolved