Making torch_remat work in TorchTitan
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Animesh Jain describes how TorchTitan integrated torch_remat for activation checkpointing, replacing aten-level selective activation checkpointing policies with named regions in model code. Distributed training complicated the approach: collectives needed their own regions, side effects and nondeterministic routing had to be controlled during replay, and missing early-stop optimization sometimes made recomputation…