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

[INTEL MKL]Fixing spurious omp thread spawning #32485

Conversation

Srini511
Copy link
Contributor

In some models that use eager/imperative code where we don’t rewrite a few operators to MKL, a lot (intra_op_threads*OMP_NUM_THREADS) of threads are spawned by Eigen matmul code. This is because -fopenmp flag is passed to Eigen as part of the build configuration. This PR fixes the configuration to not pass -fopenmp to Eigen under --config=mkl.

@tensorflow-bot tensorflow-bot bot added the size:S CL Change Size: Small label Sep 12, 2019
@Srini511
Copy link
Contributor Author

Srini511 commented Sep 13, 2019

@penpornk This is the PR to fix openmp configuration. Please let me know of any changes.

@penpornk penpornk self-requested a review September 13, 2019 00:15
Copy link
Member

@penpornk penpornk left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! I have a question and a minor formatting change request.

tensorflow/tensorflow.bzl Show resolved Hide resolved
tensorflow/compiler/xla/service/cpu/BUILD Outdated Show resolved Hide resolved
Copy link
Member

@penpornk penpornk left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes!

@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Sep 13, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Sep 13, 2019
@gbaned gbaned self-assigned this Sep 13, 2019
@Srini511
Copy link
Contributor Author

Thanks @penpornk.

@Srini511
Copy link
Contributor Author

Hi @penpornk , is everything okay with the PR?

@penpornk
Copy link
Member

@Srini511 Let's talk through email. :)

tensorflow-copybara pushed a commit that referenced this pull request Sep 13, 2019
@tensorflow-copybara tensorflow-copybara merged commit 3d6fe5a into tensorflow:master Sep 13, 2019
@nammbash nammbash deleted the sriniva2/omp_thread_explosion branch June 16, 2020 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants