pytorch/test/distributed/_tools
Sanket Purandare 9841f0ddcf Add support for non functional collectives under FakeTensorMode and fake_pg for memory tracking (#147566)
This PR adds support for non-functional collectives under `FakeTensorMode` and `fake_pg`. It helps eliminate the patching of collectives for memory and runtime estimation.

It also modifies the `ModTracker` to enable the post-backward hook call for modules whose inputs don't require gradients but parameters do.

For the memory tracking, we now enable tracking DTensor dispatcher for custom dispatch functions like `entropy_loss`.
Dispatcher is only enabled for the memory tracking part and disabled as soon as it is done.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/147566
Approved by: https://github.com/weifengpy
2025-03-08 18:00:49 +00:00
..
test_fake_collectives.py Add support for non functional collectives under FakeTensorMode and fake_pg for memory tracking (#147566) 2025-03-08 18:00:49 +00:00
test_fsdp2_mem_tracker.py [FSDP2] Move to public torch.distributed.fsdp (#141868) 2024-12-07 01:24:28 +00:00
test_mem_tracker.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_memory_tracker.py
test_mod_tracker.py Add support for non functional collectives under FakeTensorMode and fake_pg for memory tracking (#147566) 2025-03-08 18:00:49 +00:00
test_runtime_estimator.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_sac_estimator.py ILP for Auto SAC (Selective Activation Checkpointing) (#137908) 2024-10-18 12:45:37 +00:00
test_sac_ilp.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00