How to check mps availability?

Hey!

Yes, you can check torch.backends.mps.is_available() to check that.
There is only ever one device though, so no equivalent to device_count in the python API.

This doc MPS backend — PyTorch master documentation will be updated with that detail shortly!

6 Likes