pytorch / glow

Compiler for Neural Network hardware accelerators
Apache License 2.0
3.24k stars 694 forks source link

[torch_glow] failure to link required libraries #4039

Open mneilly-et opened 4 years ago

mneilly-et commented 4 years ago

I can successfully compile torch_glow with the latest pytorch (e07f3993dc04f918ea820ff99ea88b63737a03a5) but importing torch_glow fails with undefined symbols.

$ python -m pytest nodes
ImportError while loading conftest 'torch_glow/tests/conftest.py'.
conftest.py:3: in <module>
    import torch_glow
../torch_glow/__init__.py:1: in <module>
    from ._torch_glow import *
E   ImportError: torch_glow/torch_glow/_torch_glow.cpython-37m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass

Modifying torch_glow/src/CMakeLists.txt to link both libtorch_python and python for PyTorchModelLoader allows for forward progress...

jfix71 commented 4 years ago

CC: @jackm321

tlepley-cadence commented 4 years ago

The exact same problem makes the CI fail for each PRs currently

jackm321 commented 4 years ago

Looking into it, I'll try to get a fix up later today