Clean up stale TORCH_NCCL_AVOID_RECORD_STREAMS and avoidRecordStreams_ (#194701)
TORCH_NCCL_AVOID_RECORD_STREAMS has been deprecated and ignored for more than a year - stashing via stashed_for_allocator_safety_ is now unconditional. The member avoidRecordStreams_ in ProcessGroupNCCL was likewise unused, but 13 comment sites and the docs still referenced both the env var and the flag. No functional change - the stashing path was already always active. Test Plan: ``` grep -rn "TORCH_NCCL_AVOID_RECORD_STREAMS\|avoidRecordStreams_" --include="*.cpp" --include="*.hpp" --include="*.md" # -> 0 hits grep -n "stashing note" torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp # -> 12 sites lintrunner -a # -> ok No lint issues. ``` Co-authored with Muse Code powered by Meta Muse Spark. Pull Request resolved: https://github.com/pytorch/pytorch/pull/194701 Approved by: https://github.com/kapilsh, https://github.com/fduwjj
N
Natalia Gimelshein committed
61bac82d9199b7c2cef11e9d1f99b19e89fd954d
Parent: bcd86ce
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com>
on 8/25/2026, 7:44:26 PM