pytorch/torch/_dynamo/backends
Boyuan Feng 38410cf9b5 Fix DDPOptimizer issue on static tensor index (#155746)
We rely on `_try_get_metadata_from_dynamo()` to get static input indices. When the meta info is missing, it just returns an empty list of static input indices. This wrong list of static input indices lead to repeated cudagraph re-recording, which looks like a hang from the user perspective. bc3972b80a/torch/_functorch/aot_autograd.py (L1025-L1031)

The root cause is `split_module` in DDP Optimizer loses meta info and gm attributes. This PR fixes the issue by propagating these metadata from original module to submodules.
bc3972b80a/torch/_dynamo/backends/distributed.py (L515-L517)

Fixes #140395

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155746
Approved by: https://github.com/xmfan, https://github.com/bdhirsh
2025-06-14 00:15:58 +00:00
..
__init__.py
common.py Fix dynamo tracing into AOTAutogradCache results in cpu tensors (#155251) 2025-06-09 02:06:16 +00:00
cudagraphs.py Revert "Implement cuda graphs implementation of torch.cond and torch.while_loop (#140979)" 2025-02-13 18:04:26 +00:00
debugging.py Revert "Implement cuda graphs implementation of torch.cond and torch.while_loop (#140979)" 2025-02-13 18:04:26 +00:00
distributed.py Fix DDPOptimizer issue on static tensor index (#155746) 2025-06-14 00:15:58 +00:00
inductor.py [compile-time traces] Profile large missing gaps in compile time (#151256) 2025-05-13 14:44:51 +00:00
onnxrt.py [BE][Easy][15/19] enforce style for empty lines in import segments in torch/_d*/ (#129767) 2024-07-31 21:18:11 +00:00
registry.py Migrate from lru_cache to cache (#155613) 2025-06-11 19:44:18 +00:00
tensorrt.py Unify MYPYINDUCTOR and MYPY (#118432) 2024-01-27 17:23:20 +00:00
torchxla.py [BE][Easy][15/19] enforce style for empty lines in import segments in torch/_d*/ (#129767) 2024-07-31 21:18:11 +00:00
tvm.py Migrate from lru_cache to cache (#155613) 2025-06-11 19:44:18 +00:00