undefined symbol error with PyTorch 1.12 and Torchvision 0.13
See original GitHub issueThanks for reporting the unexpected results and we appreciate it a lot.
Describe the Issue
With CUDA 11.3, PyTorch 1.12 and Torchvision 0.13, using MMCV 1.5.3, I get the error:
ImportError: /opt/conda/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE
Reproduction
- What command, code, or script did you run?
MMDetection v2.25.0 train.py
- Did you make any modifications on the code? Did you understand what you have modified?
No
Environment
- Please run
python -c "from mmcv.utils import collect_env; print(collect_env())"
to collect necessary environment information and paste it here.
Can’t run this - same error as above
- You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]:
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
- Other environment variables that may be related (such as
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.) - PATH:
/opt/amazon/openmpi/bin:/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- LD_LIBRARY_PATH:
/opt/conda/lib/python3.8/site-packages/smdistributed/dataparallel/lib:/opt/amazon/openmpi/lib/:/opt/amazon/efa/lib/:/opt/conda/lib:/usr/local/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
- How you installed PyTorch [e.g., pip, conda, source]:
Error traceback
root@1a67d2e00d91:/# python -c “from mmcv.utils import collect_env; print(collect_env())” Traceback (most recent call last): File “<string>”, line 1, in <module> File “/opt/conda/lib/python3.8/site-packages/mmcv/utils/env.py”, line 112, in collect_env from mmcv.ops import get_compiler_version, get_compiling_cuda_version File “/opt/conda/lib/python3.8/site-packages/mmcv/ops/init.py”, line 2, in <module> from .active_rotated_filter import active_rotated_filter File “/opt/conda/lib/python3.8/site-packages/mmcv/ops/active_rotated_filter.py”, line 10, in <module> ext_module = ext_loader.load_ext( File “/opt/conda/lib/python3.8/site-packages/mmcv/utils/ext_loader.py”, line 13, in load_ext ext = importlib.import_module(‘mmcv.’ + name) File “/opt/conda/lib/python3.8/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: /opt/conda/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Hi @austinmw , we have just uploaded the pre-built packages for torch1.12. Enjoy the latest PyTorch and MMCV with the following commands.
Hi @austinmw , we have not provided the pre-built packages for torch1.12 so you need to install mmcv-full from source (https://mmcv.readthedocs.io/en/latest/get_started/build.html#build-on-linux-or-macos). Another way is to install torch1.11 we had provided packages for it. BTW, we will provide pre-built packages for torch1.12 in the next few days.