Closed
[Documentation|文档反馈]: SoftMarginLoss BFLOAT16 产品范围说明缺失 #8575
KaranocaVeAdd on 11 days agoClosed at 9 days ago
11 days ago Associated pull request
11 days ago Modify description of issue
11 days ago Assign KaranocaVe as responsible person
10 days ago Assign ji-songyuan as responsible person, remove original responsible person: KaranocaVe
10 days ago Assign ji-songyuan as responsible person, remove original responsible person: KaranocaVe
9 days ago Close issue
9 days ago changed custom state from 待办的 to 已完成
9 days ago Added label: resolved
[Documentation|文档反馈]: SoftMarginLoss BFLOAT16 产品范围说明缺失
现象
loss/soft_margin_loss/docs/aclnnSoftMarginLoss.md在self、target和out的数据类型栏统一列出FLOAT、FLOAT16、BFLOAT16,但没有说明 BFLOAT16 的产品范围。调用方据此可能在不支持 BFLOAT16 的产品上构造输入。证据
固定源码
ae873b119fb5499c41a6893f920171551fb0a197的aclnn_soft_margin_loss.cpp通过GetDtypeSupportListV2(ASCEND910B_DTYPE_SUPPORT_LIST, ASCEND910_DTYPE_SUPPORT_LIST)校验 dtype:DAV_2201或 Regbase 使用含 BFLOAT16 的列表,其他架构使用仅含 FLOAT/FLOAT16 的列表。OpDef 的三种 dtype 注册是通用声明,未表达这一架构条件。当前目标仓库
masterheadc9392e717995d42cca318e91aeb88a00ea584b8a的aclnnSoftMarginLoss.md仍将 BFLOAT16 列在通用参数表中,且产品支持段没有相应的 dtype 限定;该文档缺口仍存在。仓内aclnnBinaryCrossEntropy文档已用npu="910,310p"标签说明 Atlas 推理/训练产品不支持 BFLOAT16;l2_loss/README.md同时将 Atlas A2、A3 和 Ascend 950 列为支持 BFLOAT16,与固定验收源码中的实现条件相符。相关工作:Issue #7358 与已合入 PR !12626 修正 reduction 输出 shape;Issue #7364 与同一 PR 涉及 INF 传播。Issue #7565 讨论
out的 shape/rank 说明。开放 PR !13945 加固同一算子并补充 API 头文件中的 BFLOAT16 声明,尚未在本 ACLNN 文档中写明 BFLOAT16 的产品范围。影响与修复
文档缺少产品级 dtype 条件,可能导致在 Atlas 推理系列或 Atlas 训练系列产品上按文档构造 BFLOAT16 输入。补丁仅在参数表后补充
npu="910,310p"说明,保留产品支持总表和算子实现不变。验证
关联 PR: https://gitcode.com/cann/ops-nn/merge_requests/14164