Closed Liuyveg closed 2 years ago
Hi, did you follow readme to install the cudatoolkit-dev? Can you share the full log of the error?
Hi, did you follow readme to install the cudatoolkit-dev? Can you share the full log of the error?
Hi, maybe you can comment this line: https://github.com/autonomousvision/monosdf/blob/main/code/hashencoder/src/hashencoder.cu#L25 and try again.
Hi, I met the same error after following readme to reinstall the environment and trying again.
Ninja is required to load C++ extensions
was reported when running the command at first time.
And I ran this command to install Ninja. pip install ninja
It was weird that I tried again and met the error again.
Hi, did you solve the problem or could you share the full error log after installing ninja?
Hi, I am still stuck in this problem. And here is the full error log. Thanks for your kindly help.
CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --nproc_per_node 1 --nnodes=1 --node_rank=0 training/exp_runner.py --conf confs/scannet_mlp.conf --scan_id 1
/home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/distributed/launch.py:178: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torchrun.
Note that --use_env is set by default in torchrun.
If your script expects --local_rank
argument to be set, please
change it to read from os.environ['LOCAL_RANK']
instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions
warnings.warn( RANK and WORLD_SIZE in environ: 0/1 0 shell command : training/exp_runner.py --local_rank=0 --conf confs/scannet_mlp.conf --scan_id 1 Loading data ... Finish loading data. Data-set size: 465 RUNNING FOR 430 Detected CUDA files, patching ldflags Emitting ninja build file ./tmp_build/build.ninja... Building extension module _hash_encoder... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=_hash_encoder -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/TH -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 --compiler-options '-fPIC' -O3 -std=c++14 -allow-unsupported-compiler -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS__ -c /home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu -o hashencoder.cuda.o FAILED: hashencoder.cuda.o /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=_hash_encoder -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/TH -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 --compiler-options '-fPIC' -O3 -std=c++14 -allow-unsupported-compiler -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -c /home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu -o hashencoder.cuda.o /home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(25): error: no instance of overloaded function "atomicAdd" matches the argument list argument types are: (half *, c10::Half)
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=2U, C=2U, N_C=2U]" (687): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=2U, C=4U, N_C=2U]" (692): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=2U, C=8U, N_C=2U]" (698): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=3U, C=2U, N_C=2U]" (687): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=3U, C=4U, N_C=2U]" (692): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=double, D=3U, C=8U, N_C=2U]" (698): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=double, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=double]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=2U, C=2U, N_C=2U]" (687): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=2U, C=4U, N_C=2U]" (692): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=2U, C=8U, N_C=2U]" (698): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=2U]" (721): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=3U, C=2U, N_C=2U]" (687): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=3U, C=4U, N_C=2U]" (692): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu(513): warning: variable "results_grad" was declared but never referenced detected during: instantiation of "void kernel_grid_second_backward_embedding<scalar_t,D,C,N_C>(const scalar_t , const scalar_t , const scalar_t , const int , const scalar_t , const scalar_t , scalar_t , uint32_t, uint32_t, float, uint32_t) [with scalar_t=float, D=3U, C=8U, N_C=2U]" (698): here instantiation of "void kernel_grid_second_backward_wrapper<scalar_t,D>(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t ) [with scalar_t=float, D=3U]" (722): here instantiation of "void hash_encode_second_backward_cuda(const scalar_t , const scalar_t , const scalar_t , const int , uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, __nv_bool, const scalar_t , const scalar_t , scalar_t , scalar_t *) [with scalar_t=float]" (817): here
1 error detected in the compilation of "/home/ailab/ailab/LY/monosdf/code/hashencoder/src/hashencoder.cu". [2/3] c++ -MMD -MF bindings.o.d -DTORCH_EXTENSION_NAME=_hash_encoder -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/TH -isystem /home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/ailab/anaconda3/envs/ly_monosdf/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -O3 -std=c++14 -c /home/ailab/ailab/LY/monosdf/code/hashencoder/src/bindings.cpp -o bindings.o ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build subprocess.run( File "/home/ailab/anaconda3/envs/ly_monosdf/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Failures:
Hi, did you try to comment this line: https://github.com/autonomousvision/monosdf/blob/main/code/hashencoder/src/hashencoder.cu#L25 ?
Hi, did you try to comment this line: https://github.com/autonomousvision/monosdf/blob/main/code/hashencoder/src/hashencoder.cu#L25 ?
Yeah, it finally works. Thanks for your reminder.
Thanks for your wonderful work. When running command to train monosdf, the error is reported. I want to know how to solve it.