caffe2:libtorch_cuda depends on caffe2:caffe2_gpu (#17729)
authorSebastian Messmer <messmer@fb.com>
Thu, 7 Mar 2019 07:50:14 +0000 (23:50 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 7 Mar 2019 07:53:16 +0000 (23:53 -0800)
commit7d02a1fbc70d324bf587ccbfe508cd2e33ed534a
treee915040c9e88fb6b34b59dc0e8fb31eaec8a217b
parent39423fbdd41b5237a70afe711deaa742bca252fe
caffe2:libtorch_cuda depends on caffe2:caffe2_gpu (#17729)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17729

When doing "import torch" in fbcode, previously the caffe2 cuda kernels weren't loaded because libcaffe2_gpu.so wasn't loaded.
Once you also did "from caffe2.python import workspace", then the cuda kernels were loaded because that triggered a runtime mechanism for loading libcaffe2_gpu.so.

We want the cuda kernels to always be available, so this diff adds a dependency from caffe2:libtorch_cuda to caffe2:caffe2_gpu.

Reviewed By: ezyang

Differential Revision: D14353498

fbshipit-source-id: 76a9fe69f231b308ab40eac393bb216c6fad3658
tools/build_variables.py