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 @@ -1410,8 +1410,12 @@ def using_sequence_parallelism(raw_keys) -> bool:
14101410
14111411
14121412def using_expert_parallelism (raw_keys ) -> bool :
1413- if int (raw_keys ["ici_expert_parallelism" ]) > 1 and int (raw_keys ["dcn_expert_parallelism" ]) > 1 :
1414- raise ValueError ("Expert parallelism can only be enabled on ICI or DCN, not both." )
1413+ if (
1414+ int (raw_keys ["ici_expert_parallelism" ]) > 1
1415+ and int (raw_keys ["dcn_expert_parallelism" ]) > 1
1416+ and raw_keys ["hardware" ] == "tpu"
1417+ ):
1418+ raise ValueError ("Expert parallelism can only be enabled on ICI or DCN on TPU, not both." )
14151419 return int (raw_keys ["ici_expert_parallelism" ]) > 1 or int (raw_keys ["dcn_expert_parallelism" ]) > 1
14161420
14171421
You can’t perform that action at this time.
0 commit comments