nccl fixes (#14195)
authorandersj <anderspapitto@gmail.com>
Wed, 28 Nov 2018 22:40:50 +0000 (14:40 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 28 Nov 2018 22:43:06 +0000 (14:43 -0800)
commitfb7e40b7eb395c812327018415050bb25b1c5b6b
treec6ea032a277e0e15edc4c6fd250dfc0609b48440
parentca55c5411fa61c6b1f8d617b42f755ae46577cae
nccl fixes (#14195)

Summary:
This has 4 changes

1) propagate USE_SYSTEM_NCCL. Previously it was ignored and cmake always did a FindPackage
2) respect SCCACHE_DISABLE in our caffe2 sccache wrapper for circleci
3) use SCCACHE_DISABLE when building nccl, because it triggers the same bug as when using CCACHE (already tracked in https://github.com/pytorch/pytorch/issues/13362). This was hidden because we weren't respecting USE_SYSTEM_NCCL, and were never building nccl ourselves in CI
4) In one particular CI configuration (caffe2, cuda 8, cudnn 7), force USE_SYSTEM_NCCL=1. Building the bundled nccl triggers a bug in nvlink. I've done some investigation, but this looks like a tricky, preexisting bug, so rather than hold up this diff I'm tracking it separately in https://github.com/pytorch/pytorch/issues/14486
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14195

Differential Revision: D13237502

Pulled By: anderspapitto

fbshipit-source-id: 1100ac1269c7cd39e2e0b3ba12a56a3ce8977c55
.jenkins/caffe2/build.sh
cmake/External/nccl.cmake
setup.py
tools/build_pytorch_libs.sh