mapillary / inplace_abn

In-Place Activated BatchNorm for Memory-Optimized Training of DNNs
BSD 3-Clause "New" or "Revised" License
1.32k stars 187 forks source link

Import issue: Undefined symbol #224

Open curt-tigges opened 2 years ago

curt-tigges commented 2 years ago

When attempting to import Inplace-ABN version 1.1.0, I get the following error:

>>> from inplace_abn import InPlaceABN
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/__init__.py", line 1, in <module>
    from .abn import ABN, InPlaceABN, InPlaceABNSync
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/abn.py", line 8, in <module>
    from .functions import inplace_abn, inplace_abn_sync
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/functions.py", line 8, in <module>
    from . import _backend
ImportError: /home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/_backend.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv

I am using CUDA 11.2 and PyTorch 1.8.2. The Inplace-ABN files were compiled with GCC 10.

hubblezhang commented 2 years ago

When attempting to import Inplace-ABN version 1.1.0, I get the following error:

>>> from inplace_abn import InPlaceABN
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/__init__.py", line 1, in <module>
    from .abn import ABN, InPlaceABN, InPlaceABNSync
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/abn.py", line 8, in <module>
    from .functions import inplace_abn, inplace_abn_sync
  File "/home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/functions.py", line 8, in <module>
    from . import _backend
ImportError: /home/curttigges/miniconda3/envs/pytorch-dl/lib/python3.7/site-packages/inplace_abn/_backend.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv

I am using CUDA 11.2 and PyTorch 1.8.2. The Inplace-ABN files were compiled with GCC 10.

I update my cuda-10.1 to cuda-10.2, then it works.