[hotfix] fix fp16 optimzier bug (#2273)

pull/2315/head
YuliangLiu0306 2023-01-03 16:53:43 +08:00 committed by GitHub
parent fb87322773
commit f027ef7913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ class FP16Optimizer(Optimizer):
# get process group
def _get_process_group(parallel_mode):
if gpc.is_initialized(ParallelMode.DATA) and gpc.get_world_size(ParallelMode.DATA):
return gpc.get_group(ParallelMode.DATA)
if gpc.is_initialized(parallel_mode) and gpc.get_world_size(parallel_mode):
return gpc.get_group(parallel_mode)
else:
return None