autonomousvision / gaussian-opacity-fields

Gaussian Opacity Fields: Efficient and Compact Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
559 stars 26 forks source link

When I run cmake ., I encounter the following issue. Moreover, the environment setup is the same as on GitHub. #26

Closed waynechyr closed 2 weeks ago

waynechyr commented 1 month ago

CMake Error at /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message): Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.

Compiler: /usr/bin/nvcc

Build flags:

Id flags: --keep;--keep-dir;tmp -v

The output was:

255

$ SPACE=

$ CUDART=cudart

$ HERE=/usr/lib/nvidia-cuda-toolkit/bin

$ THERE=/usr/lib/nvidia-cuda-toolkit/bin

$ _TARGETSIZE=

$ _TARGETDIR=

$ _TARGETSIZE=64

$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice

$

PATH=/usr/lib/nvidia-cuda-toolkit/bin:/usr/local/cuda/bin:/usr/local/cuda/bin:/home/wayne/anaconda3/envs/gof/bin:/home/wayne/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs -L/usr/lib/x86_64-linux-gnu

$ rm tmp/a_dlink.reg.c

$ gcc -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS

-DCUDACC -DNVCC -DCUDACC_VER_MAJOR=10 -DCUDACC_VER_MINOR=1 -DCUDACC_VER_BUILD=243 -include "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"

$ cicc --c++14 --gnu_version=90400 --allow_managed -arch compute_30 -m64

-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "CMakeCUDACompilerId.fatbin.c" -tused -nvvmir-library "/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "tmp/CMakeCUDACompilerId.module_id" --orig_src_file_name "CMakeCUDACompilerId.cu" --gen_c_file_name "tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name "tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name "tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o "tmp/CMakeCUDACompilerId.ptx"

$ ptxas -arch=sm_30 -m64 "tmp/CMakeCUDACompilerId.ptx" -o

"tmp/CMakeCUDACompilerId.sm_30.cubin"

ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'

--error 0xff --

Call Stack (most recent call first): /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test) /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred! (gof) wayne@wayne-chyr:~/data/gaussian-opacity-fields/submodules/tetra-triangulation$ cmake . CMake Error at /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message): Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.

Compiler: /usr/bin/nvcc

Build flags:

Id flags: --keep;--keep-dir;tmp -v

The output was:

255

$ SPACE=

$ CUDART=cudart

$ HERE=/usr/lib/nvidia-cuda-toolkit/bin

$ THERE=/usr/lib/nvidia-cuda-toolkit/bin

$ _TARGETSIZE=

$ _TARGETDIR=

$ _TARGETSIZE=64

$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice

$

PATH=/usr/lib/nvidia-cuda-toolkit/bin:/usr/local/cuda/bin:/usr/local/cuda/bin:/home/wayne/anaconda3/envs/gof/bin:/home/wayne/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs -L/usr/lib/x86_64-linux-gnu

$ rm tmp/a_dlink.reg.c

$ gcc -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS

-DCUDACC -DNVCC -DCUDACC_VER_MAJOR=10 -DCUDACC_VER_MINOR=1 -DCUDACC_VER_BUILD=243 -include "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"

$ cicc --c++14 --gnu_version=90400 --allow_managed -arch compute_30 -m64

-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "CMakeCUDACompilerId.fatbin.c" -tused -nvvmir-library "/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "tmp/CMakeCUDACompilerId.module_id" --orig_src_file_name "CMakeCUDACompilerId.cu" --gen_c_file_name "tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name "tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name "tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o "tmp/CMakeCUDACompilerId.ptx"

$ ptxas -arch=sm_30 -m64 "tmp/CMakeCUDACompilerId.ptx" -o

"tmp/CMakeCUDACompilerId.sm_30.cubin"

ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'

--error 0xff --

Call Stack (most recent call first): /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test) /home/wayne/anaconda3/envs/gof/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!

niujinshuchong commented 1 month ago

Hi, maybe you need to specify your own cuda path such as

export CPATH=/usr/local/cuda-11.3/targets/x86_64-linux/include:$CPATH
waynechyr commented 1 month ago

Hi, maybe you need to specify your own cuda path such as

export CPATH=/usr/local/cuda-11.3/targets/x86_64-linux/include:$CPATH

First of all, thank you for your reply. Yes, my CUDA path is indeed /usr/local/cuda-11.3/targets/x86_64-linux/include. When I used the method you provided and then used the $CPATH command, I found that it showed "bash: /usr/local/cuda-11.3/targets/x86_64-linux/include: : No such file or directory". I think this is because there are two colons ":" appearing. So, after removing the colon, it became "bash: /usr/local/cuda-11.3/targets/x86_64-linux/include: is a directory". However, when I then ran "cmake .", I still encountered the same error. Did I make a mistake in any of the steps? Could you please help me with this? Thank you!

rkakash59 commented 1 month ago

same issue, @waynechyr did you solve this?

waynechyr commented 1 month ago

same issue, @waynechyr did you solve this?

Hi, I have already solved this problem. Maybe you can refer to this GitHub link. https://github.com/NVlabs/instant-ngp/issues/747

Aur1anna commented 2 weeks ago

same issue, @waynechyr did you solve this?

Hi, I have already solved this problem. Maybe you can refer to this GitHub link. NVlabs/instant-ngp#747

Hi, thanks a lot for your sharing! However, after i use “sudo apt remove nvidia-cuda-toolkit”, i run “apt-cache policy nvidia-cuda-toolkit”,and it shows as this: image

and i do can run “cmake .” but maybe something wrong?or it is just right for this step?this is it shows after i run cmake .: image

and after cmake and make , i still cant extract the mesh, the error shows :

image

I wonder if i made a mistake in any step.I would appreciate it if you could please help me with this. Thank you!

waynechyr commented 2 weeks ago

same issue, @waynechyr did you solve this?

Hi, I have already solved this problem. Maybe you can refer to this GitHub link. NVlabs/instant-ngp#747

Hi, thanks a lot for your sharing! However, after i use “sudo apt remove nvidia-cuda-toolkit”, i run “apt-cache policy nvidia-cuda-toolkit”,and it shows as this: image

and i do can run “cmake .” but maybe something wrong?or it is just right for this step?this is it shows after i run cmake .: image

and after cmake and make , i still cant extract the mesh, the error shows :

image

I wonder if i made a mistake in any step.I would appreciate it if you could please help me with this. Thank you!

"First of all, I think the previous execution seems correct. I wonder if it's because you forgot to run pip install -e ., which caused the related packages not to be installed."

Aur1anna commented 2 weeks ago

hi,thanks for reply! I didn't forget to run pip install -e ., and tetra-nerf-0.1.1 installed successfully in pip list.

I also checked the tetranerf_cpp_extension.cpython-38-x86_64-linux-gnu.so in extension: image Is the format of this file correct?

I am very confused about reporting error in extract-mesh now,i have no idea how to fix this. Thank you again for your help!

Aur1anna commented 2 weeks ago

Hi, I try this again using pytorch1.12.1+cuda11.3 instead of 2.0.1+11.7, and by referring to your shared github link I can extract-mesh successfully now.

Thank you so much for your sharing and your generous help!

waynechyr commented 2 weeks ago

Hi, I try this again using pytorch1.12.1+cuda11.3 instead of 2.0.1+11.7, and by referring to your shared github link I can extract-mesh successfully now.

Thank you so much for your sharing and your generous help!

I'm glad to have helped you. In fact, I initially tried changing environments as well. Some environments can indeed cause execution failures, but I'm not quite sure about the exact reasons.