File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
pytorch/plugins/precision Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __init__(
5656 if _TORCH_GREATER_EQUAL_2_4
5757 else getattr (
5858 torch ,
59- "cuda" if not isinstance ( device , str ) or device .split (":" )[0 ] == "cpu" else device .split (":" )[0 ],
59+ "cuda" if device .split (":" )[0 ] == "cpu" else device .split (":" )[0 ],
6060 ).amp .GradScaler ()
6161 )
6262 if scaler is not None and self .precision == "bf16-mixed" :
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __init__(
5656 if _TORCH_GREATER_EQUAL_2_4
5757 else getattr (
5858 torch ,
59- "cuda" if not isinstance ( device , str ) or device .split (":" )[0 ] == "cpu" else device .split (":" )[0 ],
59+ "cuda" if device .split (":" )[0 ] == "cpu" else device .split (":" )[0 ],
6060 ).amp .GradScaler ()
6161 )
6262 if scaler is not None and self .precision == "bf16-mixed" :
You can’t perform that action at this time.
0 commit comments