Building with USE_TENSORPIPE=0 causes errors on import torch for MacOS #56417
Labels
module: tensorpipe
Related to Tensorpipe RPC Agent
oncall: distributed
Add this issue/PR to distributed oncall triage queue
馃悰 Bug
Building with the following command on macos:
Results in the following error:
To Reproduce
Build pytorch on MacOS as above.
Expected behavior
Since tensorpipe is the default backend, it makes sense that if user sets USE_DISTRIBUTED=1, then USE_TENSORPIPE=1 should also be enabled, unless there are certain platforms where distributed is enabled but tensorpipe is not. In this case we should probably have errors during build time and not when importing torch.
Looking at the issue, it looks like
_DEFAULT_NUM_WORKER_THREADS
is only defined when#ifdef USE_TENSORPIPE
is true, but in python we import this without checking if tensorpipe is available.cc @osalpekar @jiayisuse @lw @beauby @pritamdamania87 @mrshenli @jjlilley @gqchen @rohan-varma @pietern @zhaojuanmao @satgera @aazzolini @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu
The text was updated successfully, but these errors were encountered: