Skip to content

Commit

Permalink
mps.is_available -> mps.is_built
Browse files Browse the repository at this point in the history
  • Loading branch information
qgallouedec committed Oct 6, 2023
1 parent 1e5dc90 commit 40ed03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable_baselines3/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def get_available_accelerator() -> str:
Return the available accelerator
(currently checking only for CUDA and MPS device)
"""
if hasattr(th, "has_mps") and th.backends.mps.is_available():
if hasattr(th, "has_mps") and th.backends.mps.is_built():
# MacOS Metal GPU
return "mps"
elif th.cuda.is_available():
Expand Down

0 comments on commit 40ed03c

Please sign in to comment.