Building on OSX

When I try and compile pytorch on OSX I will get this:
nvcc fatal : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported

The solution here is to downgrade to 7.3:

That worked the last time I compiled pytorch on my MBP, but now pytorch fails to build because of TLS references.

Devel/pytorch/pytorch/torch/lib/THD/master_worker/master/State.hpp:23:3: error: thread-local storage is not supported
for the current target
thread_local static rank_type s_current_worker;
^

Any suggestions?

oh man, OSX + CUDA is such a mess.

For now you can compile without distributed using:

NO_DISTRIBUTED=1 python setup.py install

@smth Thanks!

I’m actually just using the Torch libs so I can get away with just disabling building essentially all C++ code.