Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Phi] Move mean op kernel into phi #40872

Merged

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Mar 23, 2022

PR types

Function optimization

PR changes

OPs

Describe

[Phi] Move mean op kernel into phi

原先的mean op现在不能被reduce_mean等价替换,调用频次高达800余次,出于兼容考虑,单独迁移过来

zyfncg
zyfncg previously approved these changes Mar 24, 2022
}

} // namespace phi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是不是加个alias命名准确些?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thx

Copy link
Contributor

@YuanRisheng YuanRisheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个算子的Kernel逻辑需要迁移过来吗,是不是可以调用reduce_mean的Kernel进行复用?

@chenwhql
Copy link
Contributor Author

chenwhql commented Mar 24, 2022

这个算子的Kernel逻辑需要迁移过来吗,是不是可以调用reduce_mean进行复用?

试了下,不行,无法复用reduce_mean,reduce_mean并不能简单支持bf16,底层function不支持,而且这个PR两天冲突了两次,还有修改完善在这个算子上进行

@chenwhql chenwhql merged commit 8df9176 into PaddlePaddle:develop Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants