_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1012CUDATensorIdEv
See original GitHub issueIf you do not know the root cause of the problem / bug, and wish someone to help you, please post according to this template:
Instructions To Reproduce the Issue:
- what changes you made (
git diff
) or what code you wrote
<put diff or code here>
- what exact command you run:
python demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --video-input test.mp4 --output ./output.mp4
- what you observed (including the full logs):
<put logs here>
OpenCV: FFMPEG: tag 0x34363278/‘x264’ is not supported with codec id 27 and format ‘mp4 / MP4 (MPEG-4 Part 14)’ OpenCV: FFMPEG: fallback to use tag 0x31637661/‘avc1’ Could not find encoder for codec id 27: Encoder not found 0%| | 0/5616 [00:00<?, ?it/s]Traceback (most recent call last): File “demo/demo.py”, line 137, in <module> for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames): File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/tqdm/std.py”, line 1104, in iter for obj in iterable: File “/home/ubuntu/detectron2/demo/predictor.py”, line 129, in run_on_video yield process_predictions(frame, self.predictor(frame)) File “/home/ubuntu/detectron2/detectron2/engine/defaults.py”, line 189, in call predictions = self.model([inputs])[0] File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 541, in call result = self.forward(*input, **kwargs) File “/home/ubuntu/detectron2/detectron2/modeling/meta_arch/rcnn.py”, line 109, in forward return self.inference(batched_inputs) File “/home/ubuntu/detectron2/detectron2/modeling/meta_arch/rcnn.py”, line 166, in inference proposals, _ = self.proposal_generator(images, features, None) File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 541, in call result = self.forward(*input, **kwargs) File “/home/ubuntu/detectron2/detectron2/modeling/proposal_generator/rpn.py”, line 179, in forward self.training, File “/home/ubuntu/detectron2/detectron2/modeling/proposal_generator/rpn_outputs.py”, line 137, in find_top_rpn_proposals keep = batched_nms(boxes.tensor, scores_per_img, lvl, nms_thresh) File “/home/ubuntu/detectron2/detectron2/layers/nms.py”, line 17, in batched_nms return box_ops.batched_nms(boxes, scores, idxs, iou_threshold) File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torchvision/ops/boxes.py”, line 72, in batched_nms keep = nms(boxes_for_nms, scores, iou_threshold) File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torchvision/ops/boxes.py”, line 32, in nms _C = _lazy_import() File “/home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torchvision/extension.py”, line 12, in _lazy_import from torchvision import _C as C ImportError: /home/ubuntu/anaconda3/envs/detectron/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1012CUDATensorIdEv 0%| | 0/5616 [00:00<?, ?it/s]
- please also simplify the steps as much as possible so they do not require additional resources to run, such as a private dataset.
Expected behavior:
If there are no obvious error in “what you observed” provided above, please tell us the expected behavior.
If you expect the model to converge / work better, note that we do not give suggestions on how to train a new model. Only in one of the two conditions we will help with it: (1) You’re unable to reproduce the results in detectron2 model zoo. (2) It indicates a detectron2 bug.
Environment:
Please paste the output of python -m detectron2.utils.collect_env
.
sys.platform linux Python 3.7.5 (default, Oct 25 2019, 15:51:11) [GCC 7.3.0] Numpy 1.17.4 Detectron2 Compiler GCC 5.5 Detectron2 CUDA Compiler 9.1 DETECTRON2_ENV_MODULE <not set> PyTorch 1.3.1 PyTorch Debug Build False torchvision unknown CUDA available True GPU 0 GeForce GTX 1080 CUDA_HOME /usr/lib/cuda NVCC Cuda compilation tools, release 9.1, V9.1.85 Pillow 6.2.1 cv2 4.1.2
PyTorch built with:
- GCC 7.3
- Intel® Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel® 64 architecture applications
- Intel® MKL-DNN v0.20.5 (Git Hash 0125f28c61c1f822fd48570b4c1066f96fcb9b2e)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CUDA Runtime 10.0
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
- CuDNN 7.6.3
- Magma 2.5.1
- Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=True, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,
If detectron2 hasn’t been successfully installed, use python detectron2/utils/collect_env.py
.
If your issue looks like an installation issue / environment issue, please first try to solve it yourself with the instructions in https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top GitHub Comments
Hey guys, I came across this same issue. The reason I think this error comes up is,
Solution (which worked for me). Upgrade your torch and torchvision, and recompile Detectron2.
** pip install torch --upgrade ** pip install torchvision --upgrade
As I do not have any nvidea card (trying to run on cpu), so I should not have any libcudart.so