Skip to content

Commit

Permalink
check torch version inside functions
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Yao <[email protected]>
  • Loading branch information
yaox12 committed Nov 5, 2024
1 parent d2f5be8 commit 64a506c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions transformer_engine/pytorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,4 @@ def torch_get_autocast_gpu_dtype() -> torch.dtype:
TORCH_MINOR = int(torch.__version__.split(".")[1])
if TORCH_MAJOR == 2 and TORCH_MINOR >= 4:
return torch.get_autocast_dtype("cuda")
else:
return torch.get_autocast_gpu_dtype()
return torch.get_autocast_gpu_dtype()

0 comments on commit 64a506c

Please sign in to comment.