def _get_default_dtype() -> torch.dtype:
    """The default dtype for new tensors, but no lower than float32."""
    dtype = torch.get_default_dtype()
    return dtype if dtype in (torch.float32, torch.float64) else torch.float32
The default dtype for new tensors, but no lower than float32.
src/lightning/pytorch/trainer/connectors/logger_connector/result.py