From 7a495a5871843f9405165e009e0c540b409eeb4f Mon Sep 17 00:00:00 2001 From: chengduo Date: Wed, 1 Aug 2018 09:13:32 +0800 Subject: [PATCH] add threads in thread pool for CPU (#12475) --- python/paddle/fluid/parallel_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index 10028a8c6..3bbd11d98 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -121,7 +121,7 @@ class ParallelExecutor(object): else: cpu_num = int( os.environ.get('CPU_NUM', multiprocessing.cpu_count())) - exec_strategy.num_threads = cpu_num + exec_strategy.num_threads = cpu_num * 2 if build_strategy is None: build_strategy = BuildStrategy() -- GitLab