已合并
AvgPool3D和AvgPool3DGrad两个算子增加infer Datatype #8395
duxinlei创建于 8月7日
AvgPool3D和AvgPool3DGrad两个算子增加infer Datatype #8395
已合并
duxinlei创建于 8月7日
duxinlei成员
8月7日

描述

AvgPool3D和AvgPool3DGrad两个算子增加infer Datatype

关联的Issue

关联issue #5461

测试

新增ut本地编译通过;
出包验证: 蓝区geir通路通过
冒烟通过

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 duxinlei 的贡献)
Dduxinlei成员
8月7日 创建了 pull request,commit 24f3033c
atomgit-bot
atomgit-bot
8月7日 评论:

变更摘要

本次变更为 AvgPool3DAvgPool3DGrad 两个算子补充了数据类型推导(InferDataType)能力。AvgPool3D 将输出数据类型设置为与输入 x 一致;AvgPool3DGrad 则将输出数据类型设置为与梯度输入(索引 1)一致。同时为两个算子新增了覆盖 FP16、FP32、BF16 三种数据类型的单元测试。

主要改动

  • AvgPool3D 新增 InferDataTypeForAvgPool3D 函数:从输入 x(索引 0)获取数据类型,直接透传至输出,并在 IMPL_OP_INFERSHAPE 中通过 .InferDataType() 注册该推导函数。
  • AvgPool3DGrad 新增 InferDataTypeForAvgPool3DGrad 函数:从梯度输入(索引 IDX_1)获取数据类型,设置为输出数据类型,并在 IMPL_OP_INFERSHAPE 中通过 .InferDataType() 注册。
  • 新增单元测试覆盖多精度场景:为 AvgPool3DAvgPool3DGrad 各新增三个测试用例(InferDataTypeFP16InferDataTypeFP32InferDataTypeBF16),验证推导结果与预期数据类型一致。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月7日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
8月7日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
8月7日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
pooling 黄迪, 刘闯 (2/2) 黄迪, 刘闯 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

duxinlei, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了146条消息 查看更多
CANN-robotCANN-robot成员
13 天前 添加了label:approved
liuchuangdev成员
13 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:lgtm
CANN-robotCANN-robot成员
13 天前 关闭了关联的issue
CANN-robotCANN-robot成员
13 天前 合入了pull request