[gemini] APIs to set cpu memory capacity (#809)

This commit is contained in:
Jiarui Fang
2022-04-19 16:05:22 +08:00
committed by GitHub
parent f6dcd23fb9
commit 227d1cd4b3
3 changed files with 29 additions and 7 deletions

View File

@@ -275,9 +275,6 @@ def initialize(model: nn.Module,
optimizer_config=optimizer_config)
logger.info("Initializing ZeRO model and optimizer finished!", ranks=[0])
# FIXME() throw a warning if using zero with MP
if gpc.get_world_size(ParallelMode.MODEL) > 1:
logger.warning("ZeRO currently has not been tested with model parallelism.", ranks=[0])
else:
if isinstance(model, nn.Module):
# first sync model across dp ranks