Skip to content

Commit 7a495a5

Browse files
author
chengduo
authored
add threads in thread pool for CPU (#12475)
1 parent 819ac3d commit 7a495a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/parallel_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self,
121121
else:
122122
cpu_num = int(
123123
os.environ.get('CPU_NUM', multiprocessing.cpu_count()))
124-
exec_strategy.num_threads = cpu_num
124+
exec_strategy.num_threads = cpu_num * 2
125125

126126
if build_strategy is None:
127127
build_strategy = BuildStrategy()

0 commit comments

Comments
 (0)