diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index aadfb3f49ed61367b9502e1a00ad5b9c027a32b7..91a2a78203cbc50fec27b4f3ae8d3541ac4ec5da 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -42,7 +42,7 @@ import paddle.compat as cpt # 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, 8): +if sys.version_info >= (3, 8) and sys.platform == 'darwin': fork_context = multiprocessing.get_context('fork') else: fork_context = multiprocessing