3D-CODED icon indicating copy to clipboard operation
3D-CODED copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: 'chamfer_cuda.cpp'

Open njnj0314 opened this issue 3 years ago • 2 comments

hi Hello, when I run the code, I have the following problem, the folder contains this cpp file but this error is reported

Traceback (most recent call last): File "/share/home/xxx/workspacce/xx/3dco/training/train.py", line 9, in import script as script File "./inference/script.py", line 12, in import inference.correspondences as correspondences File "./inference/correspondences.py", line 16, in import extension.dist_chamfer as ext File "./extension/dist_chamfer.py", line 10, in sources=["chamfer_cuda.cpp","chamfer.cu"]) File "/share/home/xxx/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1091, in load keep_intermediates=keep_intermediates) File "/share/home/xxx/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1269, in _jit_compile is_standalone=is_standalone, File "/share/home/xxx/.local/lib/python3.7/site-packages/torch/utils/_cpp_extension_versioner.py", line 45, in bump_version_if_changed hash_value = hash_source_files(hash_value, source_files) File "/share/home/xxxi/.local/lib/python3.7/site-packages/torch/utils/_cpp_extension_versioner.py", line 15, in hash_source_files with open(filename) as file: FileNotFoundError: [Errno 2] No such file or directory: 'chamfer_cuda.cpp' job end time is Fri Nov 26 17:32:50 CST 2021

njnj0314 avatar Nov 26 '21 09:11 njnj0314

Hello When I ran python setup.py install, I used cuda10 and reported the following error, and ninja was installed. thans

job start time is Fri Nov 26 18:18:08 CST 2021 c27 running install running bdist_egg running egg_info writing chamfer.egg-info/PKG-INFO writing dependency_links to chamfer.egg-info/dependency_links.txt writing top-level names to chamfer.egg-info/top_level.txt reading manifest file 'chamfer.egg-info/SOURCES.txt' writing manifest file 'chamfer.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'chamfer' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/share/home/wanghui/.local/lib/python3.7/site-packages/torch/include -I/share/home/wanghui/.local/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/share/home/wanghui/.local/lib/python3.7/site-packages/torch/include/TH -I/share/home/wanghui/.local/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/include/python3.7m -c chamfer_cuda.cpp -o build/temp.linux-x86_64-3.7/chamfer_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=chamfer -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 gcc: error: chamfer_cuda.cpp: No such file or directory gcc: fatal error: no input files compilation terminated. /share/home/wanghui/.local/lib/python3.7/site-packages/torch/utils/cpp_extension.py:369: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) error: command 'gcc' failed with exit status 1 job end time is Fri Nov 26 18:18:11 CST 2021

njnj0314 avatar Nov 26 '21 10:11 njnj0314

Hi @njnj0314 ,

As an alternative, you could try installing the latest version from https://github.com/ThibaultGROUEIX/ChamferDistancePytorch

Best regards, Thibault

ThibaultGROUEIX avatar Jan 11 '22 16:01 ThibaultGROUEIX

Closing this since the issue is stale, feel free to reopen. Thanks a lot for for playing around with 3D-CODED Cheers, Thibault

ThibaultGROUEIX avatar Mar 03 '23 04:03 ThibaultGROUEIX