pytorch/test/distributed/_composable
Will Constable e3173d8725 [pipelining] Shape Inference (#136912)
Performs shape inference at runtime using user-provided real tensors.
- avoids the need for users to precompute shapes which is difficult and error prone
- lets us remove args from the PipelineStage ctor (in a later PR)
- deprecates existing inference helper in PipelineStage constructor for several reasons: its problematic to have to reason about the stage submod being on the right device for shape inference

The current state as of this PR:
- Users should not pass any input or output shapes into PipelineStage ctor, and shape inference will run automatically
- To override shape inference, they can continue to pass input/output args as previously

Currently, does not add a barrier after shape-inference, which essentially pipelines shape inference with the subsequent schedule action for that stage.  If this complicates debugging, we could add in a barrier (it comes at a cost, but only during the first step).

Testing:
- Removed input args from all PP test cases, thus exposing them all to shape-inference.
- Verified visually (nvidia-smi) that torchtitan PP 3D test runs shape inference fine without creating extra cuda contexts.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/136912
Approved by: https://github.com/kwen2501, https://github.com/H-Huang
2024-10-11 22:49:00 +00:00
..
fsdp [FSDP2] Required mesh_dim_names for HSDP (#137436) 2024-10-09 20:35:09 +00:00
fully_shard [FSDP2] support torch._foreach_copy_(float8) for fully_shard(Float8Linear) (#135955) 2024-10-07 16:36:31 +00:00
test_composability [pipelining] Shape Inference (#136912) 2024-10-11 22:49:00 +00:00
test_checkpoint.py Add None return type to init -- tests rest (#132376) 2024-08-01 15:44:51 +00:00
test_compose.py [BE][Easy][10/19] enforce style for empty lines in import segments in test/d*/ (#129761) 2024-07-17 16:57:39 +00:00
test_contract.py Add None return type to init -- tests rest (#132376) 2024-08-01 15:44:51 +00:00
test_replicate.py [DDP][FSDP2] keep DTensor params for replicate(fully_shard) (#133059) 2024-08-09 18:38:05 +00:00
test_replicate_with_compiler.py Add Triton CPU as an Inductor backend (#133408) 2024-09-30 20:24:52 +00:00