未验证 提交 6d1292ef 编写于 作者: Z zhangkaihuo 提交者: GitHub

Using a sorting method may achieve better performance. (#54045)

上级 acf3e526
......@@ -102,7 +102,7 @@ void TopkKernel(const Context& dev_ctx,
// The conclusion is drawn from the data through multiple sets of
// statistics
if (input_width >= 128 && k >= input_width * 0.75) {
if (input_width >= 128 && k >= input_width * 0.25) {
auto* ctx = reinterpret_cast<const phi::GPUContext*>(&dev_ctx);
if (phi::funcs::SortTopk<T>(*ctx,
input,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册