已关闭
[Bug-Report|缺陷反馈]: 部分迁移算子InferShape不支持unknown shape/rank及混合动态shape场景 #830
xuejinghui创建于  15 天前关闭于  10 天前
xuejinghui成员
15 天前 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

14 个算子(Crop/ExtractGlimpseV2/GridSampler2D/ImgWarpResize/ThreeInterpolate/ThreeInterpolateBackward/Yuv4442Yuv422/AnchorResponseFlags/DIoUGrad/GIoUGrad/ROIAlignGrad/Yolo/Lut3D/ImageProjectiveTransform)的 InferShape 在 unknown rank(-2)/ unknown dim(-1)输入下存在校验误拦截或推导错误:维度数校验未放行 unknown rank,逐维相等校验对 -1 维误报 mismatch;ThreeInterpolateBackward 的 5HD 路径还存在 uint32_t 读取 -1 维被截断为巨大正值(4294967295)的问题。

Environment / 环境信息 (Mandatory / 必填)

硬件:Ascend950;软件:CANN 9.2.0,GE 图模式动态 shape 场景(unknown rank 以 -2 表示,unknown dim 以 -1 表示)。

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. 构造包含 unknown rank({-2})或部分维度未知(如 {-1,2,4,-1})输入的上述算子;
  2. 在动态 shape 图下执行 shape 推导(或直接用仓内 InferShapeContextFaker 构造 {-1}/{-2} 输入跑 ophost UT);
  3. InferShape 返回 GRAPH_FAILED(如 idx/weight shape 一致性校验误报),或输出 shape 中 -1 维被截断为异常值。

Describe the expected behavior / 预期结果 (Mandatory / 必填)

  • 输入 unknown rank 时:按算子语义透传或将输出置 unknown rank,不报错;
  • 输入 unknown dim 时:-1 维跳过校验、已知维正常校验,派生维度不参与算术运算时置 -1;
  • ThreeInterpolateBackward 5HD 路径 -1 维正确透传;
  • 全已知 shape 及异常输入行为保持不变。

典型报错:idx/weight、grad/orig_output 等一致性校验对 -1 维误报 mismatch,InferShape 返回 4294967295(GRAPH_FAILED)。

Special notes for this issue/备注 (Optional / 选填)

适配及 UT 已在 InferShape 分支完成(含全 -1/全 -2 及混合动态 shape 用例),可关联本 issue。

likedislike
Xxuejinghui成员
15 天前 添加了label:bug-report
xuejinghui成员
15 天前 评论:

/assign

likedislike
CANN-robotCANN-robot成员
15 天前 将 xuejinghui 设为负责人
CANN-robotCANN-robot成员
10 天前 关闭了 issue
CANN-robotCANN-robot成员
10 天前 添加了label:resolved