已关闭
[Documentation|文档反馈]: 修复 asinh dtype 范围与 cdist HL fp32 UB 预留注释与代码不一致 #3801
TangPC创建于  2 天前关闭于  2 天前
TangPC
TangPC成员
2 天前 创建

一、文档链接 (必填)

二、问题文档片段 (必填)

  1. math/asinh/op_host/asinh_def.cpp 文件头部注释:
迭代一范围:仅 FP32 完整实现;FP16/BF16 在迭代二落地。
但 DataType 列表声明 3 个 dtype 保证 TilingKey 接口稳定。
  1. math/cdist/op_host/arch35/cdist_tiling_arch35.cpp 第 488-489 行 HL 分支注释:
Reserve UB for the two fixed HL fp32 compute planes (x1exp + diff, 4096 elems each = 32KB)

💡 存在的问题(选填)

  • asinh:代码中 AICore 输入/输出均声明 .DataType({ge::DT_FLOAT, ge::DT_FLOAT16, ge::DT_BF16})(asinh_def.cpp:34、:40),FP16/BF16 已完整实现,注释仍停留在"迭代一仅 FP32"的早期口径。
  • cdist:单个 fp32 平面为 8192 元素(8192 × 4B = 32KB),两个平面共 64KB;配合 HL_UB_RESERVE = 96 * 1024(cdist_tiling_arch35.h:31)中 32KB 的 fp32 M-split 累加器余量,合计 96KB。原注释"4096 elems each = 32KB"与实际 UB 预留不一致,易误导后续维护与性能分析。

三、修复内容

  • math/asinh/op_host/asinh_def.cpp:改为 dtype 范围:FP32、FP16、BF16 均已实现。
  • math/cdist/op_host/arch35/cdist_tiling_arch35.cpp:改为 8192 elems each = 32KB per plane, 64KB total,与 HL_UB_RESERVE 对齐。

关联 PR:https://gitcode.com/cann/ops-math/pull/6492

likedislike
TangPCTangPC成员
2 天前 添加了label:documentation
TangPC
TangPC成员
2 天前 评论:
likedislike
CANN-robotCANN-robot成员
2 天前 将 pingchuantang 设为负责人
CANN-robotCANN-robot成员
2 天前 关闭了 issue
CANN-robotCANN-robot成员
2 天前 添加了label:resolved