File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1397,8 +1397,12 @@ def using_sequence_parallelism(raw_keys) -> bool:
13971397
13981398
13991399def using_expert_parallelism (raw_keys ) -> bool :
1400- if int (raw_keys ["ici_expert_parallelism" ]) > 1 and int (raw_keys ["dcn_expert_parallelism" ]) > 1 :
1401- raise ValueError ("Expert parallelism can only be enabled on ICI or DCN, not both." )
1400+ if (
1401+ int (raw_keys ["ici_expert_parallelism" ]) > 1
1402+ and int (raw_keys ["dcn_expert_parallelism" ]) > 1
1403+ and raw_keys ["hardware" ] == "tpu"
1404+ ):
1405+ raise ValueError ("Expert parallelism can only be enabled on ICI or DCN on TPU, not both." )
14021406 return int (raw_keys ["ici_expert_parallelism" ]) > 1 or int (raw_keys ["dcn_expert_parallelism" ]) > 1
14031407
14041408
You can’t perform that action at this time.
0 commit comments