RenYurui / StructureFlow

Code for paper "StructureFlow: Image Inpainting via Structure-aware Appearance Flow"
Other
222 stars 42 forks source link

Error when importing resample2d_cuda #18

Open mhq6634 opened 4 years ago

mhq6634 commented 4 years ago

I have followed the instruction to build Gaussian Sampling CUDA package:

However, I get below error:

File "/data/abc/StructureFlow/src/resample2d.py", line 4, in import resample2d_cuda ImportError: /ldap_home/abc/.local/lib/python3.7/site-packages/resample2d_cuda-0.0.0-py3.7-linux-x86_64.egg/resample2d_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E

My environment:

Could anyone give me some advice? Or anyone has tried it successfully on CUDA 10.1?

zhangbaijin commented 4 years ago

yes,CUDA10.1 is ok,my python is 3.6.8 ,you can try it.------------------ 原始邮件 ------------------ 发件人: "Huiqi"notifications@github.com 发送时间: 2019年12月20日(星期五) 下午5:59 收件人: "RenYurui/StructureFlow"StructureFlow@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: [RenYurui/StructureFlow] Error when importing resample2d_cuda (#18)

I have followed the instruction to build Gaussian Sampling CUDA package:

cd ./StructureFlow/resample2d_package

python setup.py install --user

However, I get below error: File "/data/huiqi/StructureFlow/src/resample2d.py", line 4, in import resample2d_cuda ImportError: /ldap_home/huiqi.mao/.local/lib/python3.7/site-packages/resample2d_cuda-0.0.0-py3.7-linux-x86_64.egg/resample2d_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E

CUDA: 10.1 (which is something I cannot change on the server and I doubt this may be the cause, but I am not sure) Pytorch: 1.0.1 Python: 3.7

Could anyone give me some advice? Or anyone has tried it successfully on CUDA 10.1?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

RenYurui commented 4 years ago

I'm not particularly sure about the reason for this problem. But here is some information which may be useful. My pytorch version is 1.0.0. (Please double check you pytorch version, cause i think this may be the main reason.) You may need to change the "nvcc_args" in the setup.py if you do not use "arch sm_60"

mhq6634 commented 4 years ago

yes,CUDA10.1 is ok,my python is 3.6.8 ,you can try it.------------------ 原始邮件 ------------------ 发件人: "Huiqi"notifications@github.com 发送时间: 2019年12月20日(星期五) 下午5:59 收件人: "RenYurui/StructureFlow"StructureFlow@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: [RenYurui/StructureFlow] Error when importing resample2d_cuda (#18) I have followed the instruction to build Gaussian Sampling CUDA package: cd ./StructureFlow/resample2d_package python setup.py install --user However, I get below error: File "/data/huiqi/StructureFlow/src/resample2d.py", line 4, in import resample2d_cuda ImportError: /ldap_home/huiqi.mao/.local/lib/python3.7/site-packages/resample2d_cuda-0.0.0-py3.7-linux-x86_64.egg/resample2d_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E CUDA: 10.1 (which is something I cannot change on the server and I doubt this may be the cause, but I am not sure) Pytorch: 1.0.1 Python: 3.7 Could anyone give me some advice? Or anyone has tried it successfully on CUDA 10.1? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you for your reply. May I know your pytorch version as well?

Austin-111 commented 4 years ago

I met similar problem. I found that the Pytorch version must be 1.0.0 in the compiling. In the first, I used version 1.0.1 and the problem happened. Then I used 1.0.0 to compile, the problem disappeared. The resulting package can also be used in 1.0.1.