Closed
[Bug-Report|缺陷反馈]: docs/zh/api/appendix/ 下的矢量计算接口边界值说明文档存在多处错误与不完整 #1785
CruiterAdd on Sep 23Closed at Sep 24
Sep 23 Added label: bug-report
Sep 23 Assign printfscanfmain as responsible person
Sep 23 Change title to "[Bug-Report|缺陷反馈]: docs/zh/api/appendix/ 下的矢量计算接口边界值说明文档存在多处错误与不完整", originally titled "[Bug-Report|缺陷反馈]: ".
Sep 23 Change title to "[Bug-Report|缺陷反馈]: docs/zh/api/appendix/ 下的矢量计算接口边界值说明文档存在多处错误与不完整", originally titled "[Bug-Report|缺陷反馈]: ".
Sep 23 Associated pull request
Cruiter
Sep 24 Comments:
Sep 24 Comments:
最新主线中该问题已解决,本issue将关闭


Sep 24 changed custom state from 待办的 to 已完成
Sep 24 Close issue
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
docs/zh/api/appendix/ 下的矢量计算接口边界值说明文档存在多处错误与不完整,具体如下。
文档 接口对 项目
memory half/int16_t MAX / +inf
memory half/int16_t MIN / -inf
memory int16_t/float MAX
reg half/int16_t MIN
reg half/int16_t MAX
reg bfloat16_t/fp8_e8m0_t MIN / MAX
reg fp8_e8m0_t/bfloat16_t MAX
half 的 MAX 为 65504,但转换为 int16_t 时应受目标类型范围约束,原表直接照搬源类型最大值,数值超出目标类型表示范围;bfloat16_t/fp8_e8m0_t 的量级存在 100 倍量级错误。
int16_t/half、int32_t/float、int64_t/float、float/bfloat16_t 等 CAST 类转换,其边界输出会随舍入模式变化(如 CAST_RINT/CAST_CEIL/CAST_ROUND/CAST_NONE 与 CAST_FLOOR/CAST_TRUNC 结果不同),原文档仅给出单一数值,未体现该差异,易导致用户对该接口边界行为产生误判。
影响
开发者依据该文档进行边界值比对或精度验证时,会得到与算子实际行为不一致的预期值,可能导致误判为算子精度问题。
Environment / 环境信息 (Mandatory / 必填)
memory_vector_compute_interface_boundary_value_summary.md:Atlas A3 系列产品、Atlas A2 系列产品reg_vector_compute_interface_boundary_value_summary.md:Ascend 950PR & 950DT 系列产品version.cmake)Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
(1)目标类型范围越界 ——
memory表32「Cast特殊值/边界值输入」half/int16_tMAXhalf/int16_tMINhalf/int16_t+infhalf/int16_t-infint16_t/floatMAX复现判断:
int16_t表示范围为 [-32768, 32767],half→int16_t的边界输出不可能为 65504/-65504,源类型half的 MAX/MIN 被错误沿用到目标类型。(2)缺失舍入模式差异
int16_t/halfMAXint32_t/floatMAXfloat/bfloat16_tMAX/MINint64_t/floatMAXint16_t/int32_t,int16_t/float<br>int16_t/halfhalf与int32_t/int16_t/float舍入行为不同,被合并为一行int64_t/floatMIN/MAX ),应补充舍入模式相关值half/int16_tMIN/MAX复现判断:
CAST_RINT/CAST_CEIL/CAST_ROUND/CAST_NONE与CAST_FLOOR/CAST_TRUNC下边界输出不同,应为两套值。(3)表格冗余与量级错误
-inf/+0条件重复书写int16_t/int8_t、int16_t/uint8_t行与表内其他条目重复bfloat16_t/fp8_e8m0_tMIN/MAX 为1.70141e+40,应为1.70141e+38(10^2 量级错误)fp8_e8m0_t/bfloat16_tMAX 同上Describe the expected behavior / 预期结果 (Mandatory / 必填)
实际结果应与表格一致
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
暂无
Special notes for this issue/备注 (Optional / 选填)