Fix bug when compiling with caffe2 (#41868)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41868
Fix bug when compiling with caffe2
Reviewed By: jianyuh
Differential Revision: D22670707
fbshipit-source-id: aa654d7b9004257e0288c8ae8819ca5752eea443