Link NCCL lib to TORCH_PYTHON_LINK_LIBRARIES when USE_NCCL=1 (#36948)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36948
Compiling with USE_DISTRIBUTED=0 fails as it would still try to
compile python_nccl.cpp which requires NCCL but the NCCL lib is not
linked.
Test Plan: Imported from OSS
Differential Revision: D21142012
Pulled By: mrshenli
fbshipit-source-id: 6ca94056ca859da7f833a31edcb4c5260d8625e4