We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990e661 commit 835c386Copy full SHA for 835c386
src/lightning/fabric/utilities/device_dtype_mixin.py
@@ -27,7 +27,7 @@ def __init__(self) -> None:
27
self._dtype: Union[str, torch.dtype] = torch.get_default_dtype()
28
# Workarounds from the original pytorch issue:
29
# 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
+ self._device = torch.get_default_device() if _TORCH_GREATER_EQUAL_2_3 else torch.empty(0).device
31
32
@property
33
def dtype(self) -> Union[str, torch.dtype]:
0 commit comments