已关闭
[Bug-Report|缺陷反馈]: resize_v2_grad系列算子tiling中format校验误用GetOriginFormat导致图优化后校验失败 #761
chenfeng创建于 3 天前关闭于 2 天前
3 天前 添加了label:bug-report
3 天前 将 chenfeng61 设为负责人
chenfeng
3 天前 评论:
3 天前 评论:
/assign @chenfeng61


CANN-robot
3 天前 评论:
3 天前 评论:
2 天前 关闭了 issue
2 天前 添加了label:resolved
一、Describe the current behavior / 问题描述
resize_nearest_neighbor_v2_grad、resize_bilinear_v2_grad、resize_bicubic_v2_grad 三个算子的 tiling 阶段在读取输入/输出 tensor 的 format 时,使用了
GetOriginFormat()而非GetFormat().GetStorageFormat()。图优化后,张量的 origin format 可能被改写为 ND(例如 5D 折叠为 4D 等场景),而运行时真实的 storage format 仍为 NCHW 或 NHWC。此时 tiling 中的 format 校验(
CheckFormatValid/CheckInOutDtypeFormat)会拿到 ND,导致:二、Environment / 环境信息
三、Steps to reproduce the issue / 重现步骤
四、Describe the expected behavior / 预期结果
tiling 阶段应使用运行时 storage format(
GetFormat().GetStorageFormat())进行 format 校验,而非 origin format(GetOriginFormat())。当 origin format 为 ND 但 storage format 为 NCHW/NHWC 时,format 校验应正常通过,tilingKey / blockNum 应基于真实排布正确计算。五、Related log / screenshot / 日志 / 截图
修复涉及 3 个算子共 8 处 format 读取:
统一改法:
GetOriginFormat()→GetFormat().GetStorageFormat()六、Special notes for this issue/备注
修复同时扩展了 UT 框架(
tiling_context_faker.h/tiling_case_executor.cpp)以支持构造 origin≠storage 的测试场景,并新增 5 个回归用例覆盖 NCHW 和 NHWC 两条分支。关联 PR:https://gitcode.com/cann/ops-cv/pull/1304