pytorch/docs/source/mps.rst
Ramin Azarmehr b57e6fdb50 [MPS] Enable Memory Leak Detection for test_mps.py (#94646)
- To check for Memory Leaks in `test_mps.py`, set the env-variable `PYTORCH_TEST_MPS_MEM_LEAK_CHECK=1` when running test_mps.py (used CUDA code as reference).
- Added support for the following new python interfaces in MPS module:
`torch.mps.[empty_cache(), set_per_process_memory_fraction(), current_allocated_memory(), driver_allocated_memory()]`
- Renamed `_is_mps_on_macos_13_or_newer()` to `_mps_is_on_macos_13_or_newer()`, and `_is_mps_available()` to `_mps_is_available()` to be consistent in naming with prefix `_mps`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94646
Approved by: https://github.com/malfet
2023-02-13 17:56:24 +00:00

18 lines
348 B
ReStructuredText

torch.mps
===================================
.. automodule:: torch.mps
.. currentmodule:: torch.mps
.. autosummary::
:toctree: generated
:nosignatures:
synchronize
get_rng_state
set_rng_state
manual_seed
seed
empty_cache
set_per_process_memory_fraction
current_allocated_memory
driver_allocated_memory