Add sanity checks for NCCL detection.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22819
Test Plan: Imported from OSS
Differential Revision: D16283037
Pulled By: ezyang
fbshipit-source-id: fc09c9443a568d9af1c78a847282a7d707c49dd6