Skip to content

Commit 835c386

Browse files
Bordabhimrazy
andauthored
Update src/lightning/fabric/utilities/device_dtype_mixin.py
Co-authored-by: Bhimraj Yadav <[email protected]>
1 parent 990e661 commit 835c386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/fabric/utilities/device_dtype_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self) -> None:
2727
self._dtype: Union[str, torch.dtype] = torch.get_default_dtype()
2828
# Workarounds from the original pytorch issue:
2929
# https://github.com/pytorch/pytorch/issues/115333#issuecomment-1848449687
30-
self._device = torch.get_default_device() if torch.__version__ >= "2.3.0" else torch.empty(0).device
30+
self._device = torch.get_default_device() if _TORCH_GREATER_EQUAL_2_3 else torch.empty(0).device
3131

3232
@property
3333
def dtype(self) -> Union[str, torch.dtype]:

0 commit comments

Comments
 (0)