-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Change MKLDNN_THREADING definition from OMP:COMP to OMP #30230
Conversation
MKLDNN determines by itself if intel openmp is present or not. Setting this variable here prevents it from using intel openmp. This results in the behavior described in pytorch#29722
for future ref., from https://github.com/intel/mkl-dnn/blob/7d2fd500bc78936d1d648ca713b901012f470dbc/cmake/options.cmake
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, can we get some better understanding first, why the original option didn't work?
OMP:COMP is supposed to use whatever library is supplied by a compiler
@ilia-cher thank you for your review. |
@CeadeS - this is a core change and we'll need to write a detailed study before we do this. I assume the main question to answer here is |
from the docs, as I understand the version of omp library would depend on which compiler you use |
This also fixes related issue where forking process with pytorch models creates deadlocks on inference. Intel OMP doesn't cause deadlocks after forks. |
Hi @CeadeS! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
MKLDNN determines by itself if intel openmp is present or not. Define COMP in advance prevents it from using intel openmp. This results in the behavior described in #29722