已关闭
[Bug-Report|缺陷反馈]: slice infershape size 校验错误日志误写为 "offset_value"(copy-paste 错误) #2966
OpenGood_WeChat创建于 8月29日关闭于 28 天前
8月31日 关联了pull request:fix: correct operator log wording
陈思
8月31日 评论:
8月31日 评论:
8月31日 删除了关联的pull request:fix: correct operator log wording
8月31日 关联了pull request:fix: correct operator log wording
8月31日 删除了关联的pull request:fix: correct operator log wording
8月31日 删除了关联的pull request:fix: correct operator log wording
8月31日 关联了pull request:fix: correct operator log wording
8月31日 删除了关联的pull request:fix: correct operator log wording
8月31日 关联了pull request:fix: correct copy-paste error offset_value -> size_value in slice infershape size check
8月31日 关联了pull request:fix: correct copy-paste error offset_value -> size_value in slice infershape size check
9月1日 将 Twoliges 设为负责人
28 天前 关闭了 issue
28 天前 添加了label:resolved


一、问题描述 (必填)
ops-math 仓 slice 算子 infershape 中,size 分支的校验失败日志误用了 offset 分支的文案
offset_value is,实际校验和打印的均为 size 参数(copy-paste 错误),会误导用户去检查 offset 而非 size。逐字证据:
conversion/slice/op_host/slice_infershape.cpp:第 82-87 行(offset 分支,正确):
OP_CHECK_IF(slice_infer_info.offset.GetDimNum() != input_dim, OP_LOGE("CheckSliceInfo", "%s", ops::ConcatString("offset num and input rank must be the same, but offset_value is ", Ops::Base::ToString(slice_infer_info.offset).c_str(), ...第 92-97 行(size 分支,错误):
OP_CHECK_IF(slice_infer_info.size.GetDimNum() != input_dim, OP_LOGE("CheckSliceInfo", "%s", ops::ConcatString("size num and input rank must be the same, but offset_value is ", Ops::Base::ToString(slice_infer_info.size).c_str(), ...size 分支文案前半句已改为
size num and input rank must be the same,但后半句仍保留offset_value is,且打印的内容是slice_infer_info.size。应为size_value is。二、环境信息 (可选)
三、重现步骤 (可选)
对 Slice 算子传入 const size 且 size rank 与输入 rank 不一致,触发 size 分支校验失败,观察错误日志:文案提示
offset_value is,但实际打印的是 size 的值。四、预期结果 (可选)
size 分支日志后半句为
size_value is。💡 备注(选填)
纯日志文案问题,无功能影响,共 1 处。