zhou13 / neurvps

Neural Vanishing Point Scanning via Conic Convolution
MIT License
178 stars 22 forks source link

OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. #21

Closed alexpetersburg closed 3 years ago

alexpetersburg commented 3 years ago

It looks like the model can't run without CUDA, but there is no gpu on my PC. There is a deform_conv_cpu.h in the extensions folder, but it is not implemented. Are there any options to run the model without a gpu?

Traceback (most recent call last): File "/app/neurvps/models/conic.py", line 12, in init self.deform_conv = DeformConv( File "/app/neurvps/models/deformable.py", line 132, in init DCN = load_cpp_ext("DCN") File "/app/neurvps/models/deformable.py", line 24, in load_cpp_ext ext = load( File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1079, in load return _jit_compile( File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1292, in _jit_compile _write_ninja_file_and_build_library( File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1381, in _write_ninja_file_and_build_library extra_ldflags = _prepare_ldflags( File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1489, in _prepare_ldflags extra_ldflags.append(f'-L{_join_cuda_home("lib64")}') File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1982, in _join_cuda_home raise EnvironmentError('CUDA_HOME environment variable is not set. ' OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

zhou13 commented 3 years ago

Unfortunately, the deformable convolution used in this repo does not support CPUs. It should be relatively easy to replace it with a recent implementation e.g., deformable convolution from pytorchvision, but we do not have the bandwidth to do that.