Skip to content

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
gfwm2013:multiprocessing
Sep 17, 2020
Merged

Replace the 'spawn' start method with 'fork' start method for multiprocessing, on MacOS with python>=3.8#27317
gfwm2013 merged 2 commits intoPaddlePaddle:developfrom
gfwm2013:multiprocessing

Conversation

@gfwm2013
Copy link
Contributor

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

…ocessing, on MacOs when python>=3.8

test=develop
@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

# 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, ):
Copy link
Member

Choose a reason for hiding this comment

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

If this only fails for Python3.8, could we only use fork when the version_info refers to Python 3.8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done.

…ocessing, on MacOS with python>=3.8

test=develop
Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

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

LGTM

@gfwm2013 gfwm2013 merged commit bcb4a58 into PaddlePaddle:develop Sep 17, 2020
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants