mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-12 12:47:21 +00:00
[hotfix] adapt ProcessGroup and Optimizer to ColoTensor (#1388)
This commit is contained in:
@@ -104,7 +104,7 @@ class FusedSGD(Optimizer):
|
||||
# momentum application can be skipped in the main kernel.
|
||||
if 'momentum_buffer' not in param_state:
|
||||
first_run = True
|
||||
buf = param_state['momentum_buffer'] = torch.zeros_like(p.data)
|
||||
buf = param_state['momentum_buffer'] = torch.zeros_like(p)
|
||||
momentums.append(buf)
|
||||
else:
|
||||
first_run = False
|
||||
|
Reference in New Issue
Block a user