vt-vl-lab / flownet2.pytorch

Off-the-shelf FlowNet module in PyTorch-0.3.0
Apache License 2.0
118 stars 37 forks source link

modifying install.sh for only cpu #14

Open cangozpi opened 2 years ago

cangozpi commented 2 years ago

Hi, I am using a laptop with only cpu available. I believe I have to modify the *.sh files as was specified in the repository's README. Problem is that I don't know how to modify it, and the way to do it was not specified. I would really appreaciate your help to get this FlowNet implementation to work on my cpu only device. Thanks a lot for your time.

Error upon running install.sh:

Compiling correlation kernels by nvcc...
rm: cannot remove 'correlation_cuda_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 12: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling resample2d kernels by nvcc...
rm: cannot remove 'Resample2d_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 10: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling channelnorm kernels by nvcc...
rm: cannot remove 'ChannelNorm_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 10: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Yuliang-Zou commented 2 years ago

I think you have to use GPU for it since some operations are GPU-specific.