HuiZeng/Grid-Anchor-based-Image-Cropping

pytorch problem: /_roi_align.so: undefined symbol: PyInt_FromLong

ccczhixian opened this issue · 9 comments

Hi , when I run the demo_eval.py on linux, there had an error:
ImportError :/pytorch_cropping_evaluation/roi_align/_ext/roi_align/_roi_align.so: undefined symbol: PyInt_FromLong

could you please tell me how can I solve the problem?

Hi , when I run the demo_eval.py on linux, there had an error:
ImportError :/pytorch_cropping_evaluation/roi_align/_ext/roi_align/_roi_align.so: undefined symbol: PyInt_FromLong

could you please tell me how can I solve the problem?

You need to compile the source code of roi_align in your environment and generate the .so file.
Please see this issue: #1

sm_52在哪里定义

sm_52在哪里定义

这个是什么?

我编译的时候报错
image

这个参数好像和cuda版本有关。

我编译的时候报错

我觉得和CUDA版本以及使用的显卡都有关系。
可以联系一下工作站/服务器的管理员,或者找amax的销售也可以,确认一下当前的cuda版本以及所使用的显卡型号,根据显卡的型号,从下面的链接里面找出对应的gpu architecture的架构号码,修改sm_52。通常1080或者1080ti都是sm_60或以上,2080ti等的sm号码更大一些,sm_52适应于比较早的显卡结构。
https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/

怎么在Ubuntu下重新编译roi_align源码生成.so文件啊?

怎么在Ubuntu下重新编译roi_align源码生成.so文件啊?

相应的文件夹下给了make.sh文件,不过好像对pytorch的版本有一定的要求,pytorch0.4.1可以,太新的版本比如1.0之后好像改了一些底层的东西,就会报错。