[Gradient Compression] Add register_comm_hook API to DDP communication hooks documentation page (#51846)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/51846
`register_comm_hook` method is defined in DistributedDataParallel module, but it is not covered in `distributed.rst`. Since it's closely related to DDP communication hook, add the docstrings to `ddp_comm_hooks.rst` instead of a reference.
Screenshot:
{F370425625}
ghstack-source-id: 121278173
Test Plan:
view locally
python_doc_test:
https://app.circleci.com/pipelines/github/pytorch/pytorch/271234/workflows/dc0b443d-8a62-4334-9b42-800c33a68553/jobs/10770636
Reviewed By: rohan-varma
Differential Revision: D26298191
fbshipit-source-id: 32e0685fd3c935cf9a2d129e6c520a94aa3e3817