update guidelines for the number of threads#1291
Merged
wanghan-iapcm merged 2 commits intodeepmodeling:develfrom Nov 22, 2021
Merged
update guidelines for the number of threads#1291wanghan-iapcm merged 2 commits intodeepmodeling:develfrom
wanghan-iapcm merged 2 commits intodeepmodeling:develfrom
Conversation
Setting `OMP_NUM_THREADS` to 3 may be faster than 6. It needs to be confirmed.
Codecov Report
@@ Coverage Diff @@
## devel #1291 +/- ##
==========================================
- Coverage 75.97% 75.90% -0.08%
==========================================
Files 91 91
Lines 7406 7416 +10
==========================================
+ Hits 5627 5629 +2
- Misses 1779 1787 +8
Continue to review full report at Codecov.
|
Comment on lines
+129
to
+136
| if "OMP_NUM_THREADS" not in os.environ or \ | ||
| "TF_INTRA_OP_PARALLELISM_THREADS" not in os.environ or \ | ||
| "TF_INTER_OP_PARALLELISM_THREADS" not in os.environ: | ||
| logging.warning( | ||
| "To get the best performance, it is recommended to adjust " | ||
| "the number of threads by setting the environment variables " | ||
| "OMP_NUM_THREADS, TF_INTRA_OP_PARALLELISM_THREADS, and " | ||
| "TF_INTER_OP_PARALLELISM_THREADS.") |
Collaborator
There was a problem hiding this comment.
Is it a good suggestion when the user train with GPU?
I think a user only need to adjust them when he/she uses CPU.
Member
Author
There was a problem hiding this comment.
#1284 is confirmed to be caused by improper configuration of threads.
wanghan-iapcm
approved these changes
Nov 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #1284.