-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以文件为单位修改吧,我看这个文件里面还有别的BroadcastKernel调用
There was a problem hiding this 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(), |
There was a problem hiding this comment.
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
* Compilation optimization for broadcast * replaced ReduceKernel with SumKernel
* Compilation optimization for broadcast * replaced ReduceKernel with SumKernel
* Compilation optimization for broadcast * replaced ReduceKernel with SumKernel
PR types
Others
PR changes
OPs
Description
Pcard-70459
kernel编译体积优化--kernel类型:broadcast