Closed
[Documentation|文档反馈]: AdaptiveMaxPool3d Proto 中 indices 输出形状描述错误 #6975
KaranocaVeAdd on  Oct 20Closed at  19 days ago
KaranocaVe
KaranocaVe
Oct 20 Create

[Documentation|文档反馈]: AdaptiveMaxPool3d Proto 中 indices 输出形状描述错误

固定源码 cann/ops-nn@ae873b119fb5499c41a6893f920171551fb0a197 的 pooling/adaptive_max_pool3d/op_graph/adaptive_max_pool3d_proto.h 第 41 行,将 indices 注释写成与输入 x 同形。此描述不符合算子接口实际输出,调用者可能据此错误分配输出张量。
交叉证据:

  • 同版本 pooling/adaptive_max_pool3d/README.md 第 90、97 行说明 y 与 indices 同形。
  • pooling/adaptive_max_pool3d/op_host/adaptive_max_pool3d_infershape.cpp 第 74–75 行分别取得 y_shape、indices_shape;第 86–89、106–109 行对两者设置相同的 batch/channel 和输出空间维度,输出形状均为 (N,C,Dout,Hout,Wout)(4D 输入时省略 N)。
  • 两份材料都把 output_size 指定为空间输出尺寸;当输出尺寸与输入空间尺寸不同时,indices 显然不能与 x 同形。
    最小修复是将 Proto 注释中的 x 更正为 y,不涉及接口或运行时行为。

关联 PR: https://gitcode.com/cann/ops-nn/merge_requests/12412

likedislike
KaranocaVeKaranocaVe
Oct 20 Associated pull request
KaranocaVeKaranocaVe
Oct 20 Modify description of issue
yuning_chenyuning_chenCollaborators
Oct 21 Assign KaranocaVe as responsible person
CANN-robotCANN-robotCollaborators
19 days ago Close issue
CANN-robotCANN-robotCollaborators
19 days ago Added label: resolved