Replace the 'spawn' start method with 'fork' start method for multiprocessing, on MacOS with python>=3.8#27317
Merged
gfwm2013 merged 2 commits intoPaddlePaddle:developfrom Sep 17, 2020
Merged
Conversation
…ocessing, on MacOs when python>=3.8 test=develop
|
Thanks for your contribution! |
zhhsplendid
reviewed
Sep 15, 2020
python/paddle/reader/decorator.py
Outdated
| # For more details, please refer to | ||
| # https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods | ||
| # https://bugs.python.org/issue33725 | ||
| if sys.version_info >= (3, ): |
Member
There was a problem hiding this comment.
If this only fails for Python3.8, could we only use fork when the version_info refers to Python 3.8?
…ocessing, on MacOS with python>=3.8 test=develop
gfwm2013
added a commit
to gfwm2013/Paddle
that referenced
this pull request
Sep 21, 2020
…ocessing, on MacOS with python>=3.8 (PaddlePaddle#27317) * Replace the 'spawn' start method with 'fork' start method for multiprocessing, on MacOs when python>=3.8 test=develop
gfwm2013
added a commit
that referenced
this pull request
Sep 22, 2020
* Fix test_gast_with_compatibility.py due to the problem of gast in python3.8 (#27433) test=develop * fix dll load bug on windows from python3.8 (#27324) * Support python3.8 (#26850) * Support python3.8 test=notest * Replace the 'spawn' start method with 'fork' start method for multiprocessing, on MacOS with python>=3.8 (#27317) * Replace the 'spawn' start method with 'fork' start method for multiprocessing, on MacOs when python>=3.8 test=develop * Correct the error in decorator.py (#27409) test=develop Co-authored-by: Zhou Wei <[email protected]>
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.
PR types
Bug fixes
PR changes
Others
Describe
On MacOS,the spawn start method is now the default in Python3.8 multiprocessing。But paddle currently can not handle this, so force process to start using 'fork' start method.
More details, please refer to:
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
https://bugs.python.org/issue33725