Fix build failure on OSX#23998
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Hi @yf225, OSX hits the above error when trying to import torch after build (my fault). Do you why this is not caught by CI? |
|
@mrshenli I suspect that it's because we are not running OSX tests in per-PR CI, but the import error should show up on master |
Summary: pytorch#23228 caused build failure on OSX, because rpc.h is included as long as USE_DISTRIBUTED=1, but rpc/init.cpp (and others) is only included when NOT APPLE. So, it cannot find python_functions defined in init.cpp on MacOS. This PR attempt to fix it by wrapping rpc.h with USE_C10D, which is only set when NOT APPLE. I tried this fix locally and it works. Pull Request resolved: pytorch#23998 Differential Revision: D16706087 Pulled By: mrshenli fbshipit-source-id: d04fe6717a181a3198289cdef51439708c2e291d
#23228 caused build failure on OSX, because
rpc.his included as long asUSE_DISTRIBUTED=1, butrpc/init.cpp(and others) is only included whenNOT APPLE. So, it cannot findpython_functionsdefined ininit.cppon MacOS. This PR attempt to fix it by wrappingrpc.hwithUSE_C10D, which is only set when NOT APPLE.I tried this fix locally and it works.