-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 reduce #57082
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
LGTM
更新下最新的develop |
phi::SumKernel<T, Context>(ctx, | ||
*input_tensor, | ||
reduce_dims_vec, | ||
input_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.
输出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.
done
@@ -27,8 +27,7 @@ void MaxRawKernel(const Context& dev_ctx, | |||
DenseTensor* out) { | |||
reduce_all = recompute_reduce_all(x, dims, reduce_all); | |||
auto out_dtype = x.dtype(); | |||
phi::Reduce<T, kps::MaxFunctor, kps::IdentityFunctor>( | |||
dev_ctx, x, reduce_all, dims.GetData(), keep_dim, out_dtype, out); | |||
phi::MaxKernel<T, Context>(dev_ctx, x, dims, keep_dim, out); |
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.
MaxRawKernel
比MaxKernel
多一个参数,应在MaxKernel
里面调MaxRawKernel
比较合理
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.
done
PR types
Others
PR changes
Others
Description
kernel编译体积优化--kernel类型:reduce
Pcard-70459