Fix static linking cuDNN without static CUDA (#28378)
Summary:
Fixes https://github.com/pytorch/pytorch/pull/27887#issuecomment-544649765
The logs show that `USE_STATIC_CUDNN` is used but not `CAFFE2_STATIC_LINK_CUDA`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28378
Differential Revision: D18061841
Pulled By: ezyang
fbshipit-source-id: 3b9b49953094e02f808ff12107ba4226688d9986