🚀 A simple way to launch, train, and use PyTorch models on almost any device and distributed configuration, automatic mixed precision (including fp8), and easy-to-configure FSDP and DeepSpeed support
adds new clear_device_cache function in memory.py to replace repetitive code. This also adds check for mps devices in function find_executable_batch_size. This feature was tested with tests/test_memory_utils.py, which had bug.
fixes bug in get_backend function where function's 3rd outputs must be callable object. This bug caused failures in tests/test_memory_utils.py on MacOS.
Before submitting
[x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
What does this PR do?
This PR introduces 2 updates:
clear_device_cache
function in memory.py to replace repetitive code. This also adds check for mps devices in functionfind_executable_batch_size
. This feature was tested with tests/test_memory_utils.py, which had bug.get_backend
function where function's 3rd outputs must be callable object. This bug caused failures in tests/test_memory_utils.py on MacOS.Before submitting
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.