Skip to content

Commit

Permalink
fix mini topk bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qshuihu committed May 26, 2022
1 parent 51acec7 commit 4f4d42d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/fluid/operators/top_k_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ __global__ void KernelSortTopK(const size_t num_rows, const T* input_val,
}
} else {
for (int i = 0; i < K; ++i) {
int pos = (i + 1) % K;
int pos = (i + 1) % num_cols;
val[i] = in[pos];
ind[i] = pos;
}
Expand Down

0 comments on commit 4f4d42d

Please sign in to comment.