[hotfix] fix fp16 optimzier bug (#2273)

pull/2315/head
YuliangLiu0306 2 years ago committed by GitHub
parent fb87322773
commit f027ef7913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save