Open Uproar197 opened 4 years ago
@ ALL
@Uproar197 Thanks for your attention, we update our codes which supports Pytorch 1.4.0 or later!
@junfu1115 Thank you for your answer. I try the new version today, but there are still g++ errors
creating build/lib.linux-x86_64-3.6 g++ -pthread -shared -B /home/xuangen/anaconda3/envs/torch/compiler_compat -L/home/xuangen/anaconda3/envs/torch/lib -Wl,-rpath=/home/xuangen/anaconda3/envs/torch/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/operator.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/activation_kernel.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/encoding_kernel.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/syncbn_kernel.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/roi_align_kernel.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/nms_kernel.o /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/rectify.o -L/home/xuangen/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib -L:/usr/local/cuda-10.1/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.6/enclib_gpu.cpython-36m-x86_64-linux-gnu.so g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/operator.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/activation_kernel.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/encoding_kernel.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/syncbn_kernel.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/roi_align_kernel.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/nms_kernel.o: No such file or directory g++: error: /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/build/temp.linux-x86_64-3.6/rectify.o: No such file or directory error: command 'g++' failed with exit status 1
@Uproar197 you can try our code with gcc (GCC) 5.5.0.
@Uproar197 I just encounter with the same problem, and the g++ error indicate that we lack the binary execution files (xxx.o), you should find the build.ninja under your directory /home/xuangen/myproject/DANet_torch1.4/encoding/lib/gpu/, and you just use ninja command, you can get those xxx.o, at least it works for me. hope this will help you.
when I run the following command to test :
CUDA_VISIBLE_DEVICES=0,1 python test.py --dataset cityscapes --model danet --resume-dir cityscapes/model --base-size 2048 --crop-size 768 --workers 1 --backbone resnet101 --multi-grid --multi-dilation 4 8 16 --eval
it report the error:
Traceback (most recent call last): File "test.py", line 16, in
import encoding.utils as utils
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/init.py", line 13, in
from . import nn, functions, dilated, parallel, utils, models, datasets
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/nn/init.py", line 12, in
from .encoding import
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/nn/encoding.py", line 19, in
from ..functions import scaledL2, aggregate, pairwise_cosine
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/functions/init.py", line 2, in
from .encoding import
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/functions/encoding.py", line 14, in
from .. import lib
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/encoding/lib/init.py", line 15, in
], build_directory=cpu_path, verbose=False)
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 974, in load
keep_intermediates=keep_intermediates)
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1190, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1534, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
File "/home/xuangen/anaconda3/envs/torch1/lib/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'enclib_cpu'
so i come to the encoding/lib/cpu , and run : python setup.py install
then the error is :
Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) 1.10.0.git.kitware.jobserver-1 creating build/lib.linux-x86_64-3.6 g++ -pthread -shared -B /home/xuangen/anaconda3/envs/torch1/compiler_compat -L/home/xuangen/anaconda3/envs/torch1/lib -Wl,-rpath=/home/xuangen/anaconda3/envs/torch1/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/operator.o /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/roi_align_cpu.o /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/encoding_cpu.o /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/syncbn_cpu.o /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/nms_cpu.o -L/home/xuangen/anaconda3/envs/torch1/lib/python3.6/site-packages/torch/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-3.6/enclib_cpu.cpython-36m-x86_64-linux-gnu.so g++: error: /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/operator.o: No such file or directory g++: error: /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/roi_align_cpu.o: No such file or directory g++: error: /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/encoding_cpu.o: No such file or directory g++: error: /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/syncbn_cpu.o: No such file or directory g++: error: /home/xuangen/myproject/DANet-master/encoding/lib/cpu/build/temp.linux-x86_64-3.6/nms_cpu.o: No such file or directory error: command 'g++' failed with exit status 1
Is there anyone know how to solve this problem , I am so confusing, Please redeem me !!!!! Please