[booster] support torch fsdp plugin in booster (#3697)

Co-authored-by: 纪少敏 <jishaomin@jishaomindeMBP.lan>
This commit is contained in:
wukong1992
2023-05-15 12:14:38 +08:00
committed by GitHub
parent ad6460cf2c
commit b37797ed3d
4 changed files with 358 additions and 2 deletions

View File

@@ -167,10 +167,10 @@ def rerun_if_address_is_in_use():
"""
# check version
torch_version = version.parse(torch.__version__)
assert torch_version.major == 1
assert torch_version.major >= 1
# only torch >= 1.8 has ProcessRaisedException
if torch_version.minor >= 8:
if torch_version >= version.parse("1.8.0"):
exception = torch.multiprocessing.ProcessRaisedException
else:
exception = Exception