Fix the caffe2_gpu linkage with torch on Windows (#16071)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/15992.
Inspired by https://docs.microsoft.com/en-us/cpp/build/reference/optimization-best-practices?view=vs-2017. But this PR needs to be tested.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16071
Differential Revision: D13693006
Pulled By: soumith
fbshipit-source-id: e83e9ae2591fa4da01d2b1b593558dba3bdc3cf7