Skip to content

Commit bf811e1

Browse files
author
lilong12
authored
use executor for mp (#2223)
1 parent ec3c633 commit bf811e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/language_model/gpt-3/static/run_pretrain_static.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def dist_optimizer(args, topo):
108108
"dp_degree": args.dp_degree,
109109
"optimize_offload": False,
110110
}
111+
elif args.mp_degree > 1 and args.dp_degree == 1:
112+
# For MP or MP + DP, use executor instead of parallel_executor
113+
dist_strategy.without_graph_optimization = True
111114
if args.pp_degree > 1:
112115
dist_strategy.pipeline_configs = {
113116
"schedule_mode": "1F1B",

0 commit comments

Comments
 (0)