Skip to content
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

Top K algorithm: parallel version #10941

Merged
merged 2 commits into from
May 30, 2018

Conversation

mozga-intel
Copy link
Contributor

@mozga-intel mozga-intel commented May 25, 2018

The implementation of the Top-k algorithm of PaddlePaddle with omp.

  • The top-k algorithm without omp
    Result: top_k 58 3813.27 33.239 69.4531 65.746
  • The top-k algorithm with omp
    Result: top_k 58 92.8446 0.889532 5.54269 1.60077

@@ -55,6 +55,9 @@ class TopkKernel : public framework::OpKernel<T> {
// NOTE: eigen shape doesn't affect paddle tensor.
eg_input.reshape(flat2dims);

#ifdef PADDLE_WITH_MKLDNN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use PADDLE_WITH_MKLML, since the speedup of top_k_op can be used in MKL scenario.

luotao1
luotao1 previously approved these changes May 29, 2018
Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! @mozga-intel Could you merge the latest develop code to pass the teamcity?

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!Thanks very much!

@luotao1 luotao1 merged commit 66ec827 into PaddlePaddle:develop May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants