Skip to content

Commit

Permalink
Fix autocast deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
jondeaton committed Sep 6, 2024
1 parent bdea56f commit a6dd60b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transformer_engine/pytorch/module/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def set_activation_dtype(self, inp: torch.Tensor) -> None:
"""Get activation data type for AMP."""
# Native AMP (`torch.autocast`) gets highest priority
if torch.is_autocast_enabled():
self.activation_dtype = torch.get_autocast_gpu_dtype()
self.activation_dtype = torch.get_autocast_dtype('cuda')
return

# All checks after this have already been performed once, thus skip
Expand Down

0 comments on commit a6dd60b

Please sign in to comment.