Skip to content

Commit 60c5b6e

Browse files
committed
soften the EP check for ICI and DCN with GPUs and fix linter
1 parent e3ddb1a commit 60c5b6e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/MaxText/pyconfig.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,8 +1397,12 @@ def using_sequence_parallelism(raw_keys) -> bool:
13971397

13981398

13991399
def 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

0 commit comments

Comments
 (0)