mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-27 04:33:04 +00:00
change 'xxx if xxx else None' to 'xxx or None'
This commit is contained in:
@@ -67,7 +67,7 @@ class BertPolicy(Policy):
|
||||
else:
|
||||
norm_cls = col_nn.LayerNorm
|
||||
|
||||
sp_mode = self.shard_config.sequence_parallelism_mode if self.shard_config.enable_sequence_parallelism else None
|
||||
sp_mode = self.shard_config.sequence_parallelism_mode or None
|
||||
assert sp_mode != "all_to_all", "all_to_all sequence parallelism is not supported for Bert"
|
||||
if sp_mode == "ring":
|
||||
warnings.warn(
|
||||
|
Reference in New Issue
Block a user