[DDP Comm Hook] Create a noop hook for performance debugging (#64344)
authorYi Wang <wayi@fb.com>
Thu, 2 Sep 2021 00:32:39 +0000 (17:32 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 2 Sep 2021 00:36:22 +0000 (17:36 -0700)
commitbf9d66586c388c0aa223644b1d224227443ae34b
treede53558cc18b456144b1599980ba136591d819bc
parentbaceea442621346cc42f86c28d9d239531dfa006
[DDP Comm Hook] Create a noop hook for performance debugging (#64344)

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

As title.

Additionally, avoid using numpy array in test_ddp_hooks.py.
ghstack-source-id: 137170449

Test Plan: buck test mode/dev-nosan caffe2/test/distributed/algorithms/ddp_comm_hooks:test_ddp_hooks -- test_ddp_comm_hook_noop_hook

Reviewed By: rohan-varma

Differential Revision: D30693220

fbshipit-source-id: e17f0d1c6198863cf20a53566f586a6bff602522
test/distributed/algorithms/ddp_comm_hooks/test_ddp_hooks.py
torch/distributed/algorithms/ddp_comm_hooks/__init__.py
torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py [new file with mode: 0644]