few-shot-vid2vid icon indicating copy to clipboard operation
few-shot-vid2vid copied to clipboard

flownet2_pytorch resample2d_cuda error

Open yisampi opened this issue 5 years ago • 10 comments

Has anyone encountered this error? ImportError: /root/miniconda/envs/py36/lib/python3.6/site-packages/resample2d_cuda-0.0.0-py3.6-linux-x86_64.egg/resample2d_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19NonVariableTypeMode10is_enabledEv

my environment: Docker:nvidia/cuda:9.2-cudnn7-devel-ubuntu18.04-py3.6.10 torch:1.2.0

yisampi avatar Feb 23 '20 02:02 yisampi

Same problem.

zhhezhhe avatar Mar 06 '20 09:03 zhhezhhe

You need to compile the flownet module. I believe it's mentioned in the readme.md

k4rth33k avatar Mar 06 '20 10:03 k4rth33k

You need to compile the flownet module. I believe it's mentioned in the readme.md

Thank you for your quick reply! I have run bash install.sh to install flownet successfully. But I still got

ImportError: /ssd3/zhaoruiqi/anaconda3/envs/python3/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: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

I use python3.7, pytorch 1.2.0, torchvision 0.4.0, cuda 10.0, gcc4.9 do you think there is a problem with my setup?

zhhezhhe avatar Mar 06 '20 11:03 zhhezhhe

If you have installed flownet successfully, I don't think the problem is with the setup. I ran it on almost the same setup but with python 3.6 and pip

k4rth33k avatar Mar 06 '20 11:03 k4rth33k

If you have installed flownet successfully, I don't think the problem is with the setup. I ran it on almost the same setup but with python 3.6 and pip

There are no errors when I run bash install.sh for flownet2-pytorch. But when I import resample2d_cuda an error came out

undefined symbol: _ZN2at19NonVariableTypeMode10is_enabledEv

Is it a pytorch-version problem? I used pytorch1.2.0 cuda-10.0/cuda-9.2.

zhhezhhe avatar Mar 08 '20 02:03 zhhezhhe

The problem is solved. python3.6 is OK.

zhhezhhe avatar Mar 08 '20 03:03 zhhezhhe

Go to the folder: vid2vid/models/flownet2_pytorch/networks/resample2d_package/

and run the commands: python3 setup.py build and python3 setup.py install

in that order, fixed it for me.

Hamed-Aghapanah avatar Apr 06 '21 04:04 Hamed-Aghapanah

The problem is solved. python3.6 is OK.

I follow all of your configurations but I am getting errors about the apex package. Could you please help?

####################ERROR######## class GradScaler(torch.cuda.amp.GradScaler): AttributeError: module 'torch.cuda' has no attribute 'amp'

########################

mamunctg avatar Apr 26 '22 17:04 mamunctg

@mamunctg I also encountered this problem. How did you solve it?

songyn95 avatar Jun 15 '22 06:06 songyn95

@songyn95 @mamunctg install the apex package.

digvijayad avatar Aug 22 '22 02:08 digvijayad