StructureFlow icon indicating copy to clipboard operation
StructureFlow copied to clipboard

Error when importing resample2d_cuda

Open mhq6634 opened this issue 6 years ago • 4 comments

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/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:

  • 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?

mhq6634 avatar Dec 20 '19 09:12 mhq6634

yes,CUDA10.1 is ok,my python is 3.6.8 ,you can try it.------------------ 原始邮件 ------------------ 发件人: "Huiqi"[email protected] 发送时间: 2019年12月20日(星期五) 下午5:59 收件人: "RenYurui/StructureFlow"[email protected]; 抄送: "Subscribed"[email protected]; 主题: [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.

zhangbaijin avatar Dec 20 '19 11:12 zhangbaijin

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"

RenYurui avatar Dec 21 '19 02:12 RenYurui

yes,CUDA10.1 is ok,my python is 3.6.8 ,you can try it.------------------ 原始邮件 ------------------ 发件人: "Huiqi"[email protected] 发送时间: 2019年12月20日(星期五) 下午5:59 收件人: "RenYurui/StructureFlow"[email protected]; 抄送: "Subscribed"[email protected]; 主题: [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?

mhq6634 avatar Dec 24 '19 05:12 mhq6634

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.

Austin-111 avatar Oct 22 '20 07:10 Austin-111