def _choose_auto_accelerator() -> str:
        """Choose the accelerator type (str) based on availability when ``accelerator='auto'``."""
        if XLAAccelerator.is_available():
            return "tpu"
        if MPSAccelerator.is_available():
            return "mps"
        if CUDAAccelerator.is_available():
            return "cuda"
        return "cpu"
Choose the accelerator type (str) based on availability when ``accelerator='auto'``.
src/lightning/fabric/connector.py