Unverified Commit 09edd77f authored by jiaqianjing's avatar jiaqianjing Committed by GitHub
Browse files

Check if the current compiled version of pytorch supports MPS (#30664)

parent 307f632b
......@@ -373,7 +373,7 @@ def is_torch_mps_available():
import torch
if hasattr(torch.backends, "mps"):
return torch.backends.mps.is_available()
return torch.backends.mps.is_available() and torch.backends.mps.is_built()
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment