mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-06-30 03:38:13 +00:00
mps.is_available -> mps.is_built
This commit is contained in:
parent
1e5dc90a6a
commit
40ed03cddb
1 changed files with 1 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Reference in a new issue