Skip to content

Conversation

@mrshenli
Copy link
Contributor

@mrshenli mrshenli commented Aug 8, 2019

#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.

@pytorchbot pytorchbot added the module: internals Related to internal abstractions in c10 and ATen label Aug 8, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mrshenli
Copy link
Contributor Author

mrshenli commented Aug 8, 2019

import torch
dyld: lazy symbol binding failed: Symbol not found: __ZN5torch11distributed3rpc16python_functionsEv
Referenced from: /Users/ashkanaliabadi/Development/pytorch/torch/lib/libtorch_python.dylib
Expected in: flat namespace
dyld: Symbol not found: __ZN5torch11distributed3rpc16python_functionsEv
Referenced from: /Users/ashkanaliabadi/Development/pytorch/torch/lib/libtorch_python.dylib
Expected in: flat namespace
Abort trap: 6

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?

@facebook-github-bot
Copy link
Contributor

@mrshenli merged this pull request in 02d3c30.

@yf225
Copy link
Contributor

yf225 commented Aug 8, 2019

@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 pytorch_macos_10_13_py3_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: internals Related to internal abstractions in c10 and ATen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants