facebookresearch / recipes

Recipes are a standard, well supported set of blueprints for machine learning engineers to rapidly train models using the latest research techniques without significant engineering overhead.Specifically, recipes aims to provide- Consistent access to pre-trained SOTA models ready for production- Reference implementations for SOTA research reproducibility, and infrastructure to guarantee correctness, efficiency, and interoperability.
BSD 3-Clause "New" or "Revised" License
284 stars 35 forks source link

More aggressive memory freeing from TrainPipelineContext #43

Closed dstaay-fb closed 3 months ago

dstaay-fb commented 3 months ago

Summary: X-link: https://github.com/pytorch/torchrec/pull/1967

As users highlighted, TrainPipeline refactoring introduced memory regression ~2% due to more context management for code readability. This results in higher peak memory (takes longer for a context to drop out of refcount)

relatively easy to get a lot more aggressive about releasing memory stored in TrainPipelineContext.

broader internal discusion: https://fb.workplace.com/groups/970281557043698/permalink/1664528510952329/

Differential Revision: D57123339

Privacy Context Container: 1203980333745195

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D57123339

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D57123339

facebook-github-bot commented 3 months ago

This pull request has been merged in facebookresearch/recipes@875435a724fa2f38ba3c778a3c7c81c333287d41.