[Gradient Compression] Rename the first arg of pybinding of _register_comm_hook: ddp_model -> reducer. (#46498)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46498

The name of the first arg "ddp_model" is misleading, because it is actually the reducer of DDP model rather than entire model.

This method is called in the file caffe2/torch/nn/parallel/distributed.py:
`dist._register_comm_hook(self.reducer, state, hook)`
ghstack-source-id: 114531188

(Note: this ignores all push blocking failures!)

Test Plan: waitforbuildbot

Reviewed By: pritamdamania87

Differential Revision: D24372827

fbshipit-source-id: dacb5a59e87400d93a2f35da43560a591ebc5499
This commit is contained in:
Yi Wang
2020-10-16 16:07:13 -07:00
committed by Facebook GitHub Bot
parent 0c9787c758
commit d1ca7ef33e

View File

@ -149,7 +149,7 @@ PyObject* c10d_init(PyObject* _unused, PyObject* noargs) {
module.def(
"_register_comm_hook",
&_register_comm_hook,
py::arg("ddp_model"),
py::arg("reducer"),
py::arg("state"),
py::arg("comm_hook"));