Skip to content

Commit

Permalink
re-run action
Browse files Browse the repository at this point in the history
  • Loading branch information
y199387 committed Aug 9, 2022
1 parent 08a86cf commit ab0c52e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class IPEXBF16Precision(PrecisionPlugin):
@contextmanager
def forward_context(self):
"""AMP for managing model forward/training_step/evaluation_step/predict_step."""
with torch.cpu.amp.autocast():
# Manually set the dtype
with torch.cpu.amp.autocast(dtype=torch.bfloat16):
yield

def optimizer_step(self,
Expand Down

0 comments on commit ab0c52e

Please sign in to comment.