Fix logging for mps in auto_select_torch_device (#1513)
This commit is contained in:
@@ -48,7 +48,7 @@ def auto_select_torch_device() -> torch.device:
|
|||||||
logging.info("Cuda backend detected, using cuda.")
|
logging.info("Cuda backend detected, using cuda.")
|
||||||
return torch.device("cuda")
|
return torch.device("cuda")
|
||||||
elif torch.backends.mps.is_available():
|
elif torch.backends.mps.is_available():
|
||||||
logging.info("Metal backend detected, using cuda.")
|
logging.info("Metal backend detected, using mps.")
|
||||||
return torch.device("mps")
|
return torch.device("mps")
|
||||||
else:
|
else:
|
||||||
logging.warning("No accelerated backend detected. Using default cpu, this will be slow.")
|
logging.warning("No accelerated backend detected. Using default cpu, this will be slow.")
|
||||||
|
|||||||
Reference in New Issue
Block a user