[docs]defis_built()->bool:r"""Returns whether PyTorch is built with MPS support. Note that this doesn't necessarily mean MPS is available; just that if this PyTorch binary were run a machine with working MPS drivers and devices, we would be able to use it."""returntorch._C.has_mps
[docs]@_lru_cache()defis_available()->bool:r"""Returns a bool indicating if MPS is currently available."""returntorch._C._is_mps_available()
Docs
Access comprehensive developer documentation for PyTorch
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.