Merged
[Docs] 补充 SoftMarginLoss 的 BFLOAT16 产品限制 #14164
[Docs] 补充 SoftMarginLoss 的 BFLOAT16 产品限制 #14164
Merged
KaranocaVeAdd on 11 days ago
KaranocaVe
KaranocaVe
11 days ago

[Docs] 补充 SoftMarginLoss 的 BFLOAT16 产品限制

变更

aclnnSoftMarginLoss 参数表把 self、target 和 out 的数据类型统一列为 FLOAT、FLOAT16、BFLOAT16,但没有说明产品架构差异。在固定验收源码 ae873b119fb5499c41a6893f920171551fb0a197 中,类型校验按架构选择支持列表:DAV_2201 或 Regbase 支持 BFLOAT16,其他架构仅支持 FLOAT/FLOAT16,文档可能误导调用方在 Atlas 推理系列(310p)和 Atlas 训练系列(910)使用 BFLOAT16。
在参数表后增加 npu="910,310p" 产品限定,明确 Atlas 推理系列和 Atlas 训练系列不支持 BFLOAT16。Atlas A2、Atlas A3 和 Ascend 950 的 BFLOAT16 支持保持由实现和现有产品支持表表达,不修改算子实现或其他参数合同。

关联工作

  • Issue #7358 与已合入 PR !12626 修正 reduction 输出 shape,与本文档的 BFLOAT16 产品范围缺失不同。
  • Issue #7364 与 Issue #7565 分别讨论 INF 传播和 out 的 shape/rank,均与 dtype 产品范围不同。
  • 开放 PR !13945 加固 SoftMarginLoss 并补充 API 头文件中的 BFLOAT16 声明;当前 ACLNN 文档仍缺产品级 dtype 限定。

验证

  • 结论:固定基线和当前目标 master 的 SoftMarginLoss 参数表均把 BFLOAT16 写成通用类型,未标明 Atlas 推理系列和 Atlas 训练系列不支持 BFLOAT16;当前 master 只完成只读文档核对,未扩展 NPU 运行验证范围。

关联 Issue: https://gitcode.com/cann/ops-nn/issues/8575

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for KaranocaVe's contribution.)
KaranocaVeKaranocaVe
11 days ago Created pull request, commit a2d48358
KaranocaVeKaranocaVe
11 days ago Associated issue: [Documentation|文档反馈]: softMarginLoss aclnn文档中部分说明有误,[Bug-Report|缺陷反馈]:950上SoftMarginLoss算子的DAG计算INF传播与910等旧版本实现不一致,且与本仓库的SoftMarginLossGrad反向算子也不一致,存在兼容性风险,[Documentation|文档反馈]: aclnnSoftMarginLoss 资料 out 行维度列写 1-8,与同一行「out 为 scalar」互相矛盾,[Documentation|文档反馈]: SoftMarginLoss BFLOAT16 产品范围说明缺失
atomgit-bot
atomgit-bot
11 days ago Comments:

变更摘要

本 PR 为 aclnnSoftMarginLoss 接口文档补充数据类型的产品架构限定。此前 aclnnSoftMarginLoss 参数表将 self、target 和 out 的数据类型统一标注为 FLOAT、FLOAT16、BFLOAT16,未区分产品架构,容易让调用方误以为 Atlas 推理系列和 Atlas 训练系列也支持 BFLOAT16。本次在 loss/soft_margin_loss/docs/aclnnSoftMarginLoss.md 参数表之后新增产品限定说明,明确这两类产品不支持 BFLOAT16;算子实现与其他参数约定不变。

主要改动

  • 补充 BFLOAT16 产品适用范围限制:在 aclnnSoftMarginLoss 参数表后新增 npu="910,310p" 限定的说明条目,指明 Atlas推理系列产品 与 Atlas训练系列产品 的数据类型不支持 BFLOAT16。
  • 明确文档与实现约束保持一致:该说明与按架构选择支持列表的类型校验行为对齐,避免调用方在上述产品上误用 BFLOAT16。
  • 仅文档改动、无接口契约变更:改动仅涉及 aclnnSoftMarginLoss.md 的新增说明行,不涉及算子实现或其他参数合同调整。

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

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

代码审查

✅ 未发现问题


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

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
11 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
11 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 ✅ 杨露, 杨阳 (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

KaranocaVe, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
11 days ago Set zengjuan,u010470851,chenfeng61,chaotang233,crystalhu,yu-xinjie62,yangyang016,fanqirui,gitee-duhuiping,su-yueming,yourealize,chenqi317,wang-xing001,liubo75,tangweiwei2,gitcode-chenjiao,east_yang,lwx1255555,pingchuantang,qianzehong,fengying555682,caiwenwen,yanglu-1 as approver
CANN-robotCANN-robotCollaborators
11 days ago Set gitee-duhuiping,gitcode-chenjiao,lwx1255555,fengying555682,caiwenwen,yanglu-1 as approver
KaranocaVe
KaranocaVe
11 days ago Comments:

/compile

likedislike
KaranocaVeKaranocaVe
11 days ago Pre merge succeeded (commit_id: 9913e1ed3fa988ee0d6a12a5bc670712f82366df)
CANN-robot
CANN-robotCollaborators
11 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
11 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
11 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
11 days ago Added label: ci-pipeline-passed
yuning_chen
yuning_chenCollaborators
11 days ago Comments:

您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!
@wang-xing001 @yangyang016 @fengying555682 @chaotang233 @pingchuantang @lwx1255555 @gitcode-chenjiao @gitee-duhuiping @caiwenwen

likedislike
yangyang016
yangyang016Collaborators
11 days ago Comments:

/lgtm
/approve

likedislike
yanglu-1
yanglu-1Collaborators
9 days ago Comments:

/approve
/lgtm

likedislike
CANN-robot
CANN-robotCollaborators
9 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
9 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
9 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
9 days ago Merged pull request