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

Compilation optimization for broadcast #57118

Merged
merged 7 commits into from Sep 22, 2023

Conversation

tianhaodongbd
Copy link
Contributor

@tianhaodongbd tianhaodongbd commented Sep 8, 2023

PR types

Others

PR changes

OPs

Description

Pcard-70459
kernel编译体积优化--kernel类型:broadcast

@paddle-bot
Copy link

paddle-bot bot commented Sep 8, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

niuliling123
niuliling123 previously approved these changes Sep 15, 2023
std::vector<phi::DenseTensor*> mul_outputs = {&equal_out_tensor};
funcs::BroadcastKernel<T>(
dev_ctx, mul_inputs, &mul_outputs, funcs::MultiplyFunctor<T>(), 0);
phi::MultiplyKernel<T, Context>(
Copy link
Contributor

Choose a reason for hiding this comment

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

以文件为单位修改吧,我看这个文件里面还有别的BroadcastKernel调用

Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

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

Almost LGTM. 有一处小细节问题,后面PR改下,这个PR先合入了。

phi::SumKernel<T, Context>(dev_ctx,
equal_out_tensor,
reduce_dims,
equal_out_tensor.dtype(),
Copy link
Contributor

Choose a reason for hiding this comment

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

这个参数是out_dtype,应该设置成equal_count的dtype

@Xreki Xreki merged commit 14c282c into PaddlePaddle:develop Sep 22, 2023
27 checks passed
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
* Compilation optimization for broadcast

* replaced ReduceKernel with SumKernel
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
* Compilation optimization for broadcast

* replaced ReduceKernel with SumKernel
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* Compilation optimization for broadcast

* replaced ReduceKernel with SumKernel
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.

None yet

3 participants