Skip to content

Commit

Permalink
πŸ”€ [Merge] branch 'TEST'
Browse files Browse the repository at this point in the history
  • Loading branch information
henrytsui000 committed Jul 10, 2024
2 parents 5c75287 + 29cb6c9 commit 6db27bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolo/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_device(device_spec: Union[str, int, List[int]]) -> torch.device:
device_spec = initialize_distributed()
if torch.cuda.is_available() and "cuda" in str(device_spec):
return torch.device(device_spec), ddp_flag
if not torch.cuda.is_available() and not torch.backends.mps.is_available():
if not torch.cuda.is_available():
if device_spec != "cpu":
logger.warning(f"❎ Device spec: {device_spec} not support, Choosing CPU instead")
return torch.device("cpu"), False
Expand Down

0 comments on commit 6db27bb

Please sign in to comment.