mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-07 12:01:39 +00:00
[zero] sharded model support the reuse of fp16 shard (#495)
* sharded model supports reuse fp16 shard * rename variable * polish code * polish code * polish code
This commit is contained in:
@@ -56,6 +56,8 @@ class CPUAdam(torch.optim.Optimizer):
|
||||
bias_correction2,
|
||||
loss_scale,
|
||||
use_adamw=False):
|
||||
# FIXME(ver217): remove the below line when replace torch adam with fused adam
|
||||
grad = grad.float()
|
||||
if loss_scale is not None:
|
||||
grad.div_(loss_scale)
|
||||
|
||||
|
Reference in New Issue
Block a user