"vscode:/vscode.git/clone" did not exist on "0be8d8a7f6a86384c1c4a42a645669a37f9c01f1"
Commit 5ae6008d authored by Michael Carilli's avatar Michael Carilli
Browse files

For testing purposes, enable the case where FusedAdam is not wrapped by amp

parent 53fd093d
...@@ -78,6 +78,7 @@ class FusedAdam(torch.optim.Optimizer): ...@@ -78,6 +78,7 @@ class FusedAdam(torch.optim.Optimizer):
if closure is not None: if closure is not None:
loss = closure() loss = closure()
if hasattr(self, "_amp_stash"):
grads = self._amp_stash.grads grads = self._amp_stash.grads
output_params = self._amp_stash.output_params output_params = self._amp_stash.output_params
scale = self._amp_stash.scale scale = self._amp_stash.scale
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment