Skip to content

Commit 66ec827

Browse files
authored
Merge pull request #10941 from mozga-intel/mozga-intel/Top-K
Top K algorithm: parallel version
2 parents 2c14df3 + 278f55b commit 66ec827

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

paddle/fluid/operators/top_k_op.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class TopkKernel : public framework::OpKernel<T> {
5555
// NOTE: eigen shape doesn't affect paddle tensor.
5656
eg_input.reshape(flat2dims);
5757

58+
#ifdef PADDLE_WITH_MKLML
59+
#pragma omp parallel for
60+
#endif
5861
for (size_t i = 0; i < row; i++) {
5962
std::vector<std::pair<T, size_t>> vec;
6063
for (size_t j = 0; j < col; j++) {

0 commit comments

Comments
 (0)