subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1

mjlee: <p>Hi!</p>
<p>I’ve encountered an error while trying to instantiate the ‘NeRFNetwork’ class.</p>
<p>I’ve spent a few hours searching for a solution, but I haven’t been able to resolve it.</p>
<p>Can anyone please help me out?</p>
<p>I’m asking here because I guess this might be a low-level or system-level problem (not related to specific gitrepo) based on similar errors I found on the internet,  but I’m not entirely sure. Sorry. TT</p>
<pre><code class="lang-auto">`
python main.py data/obama/ --workspace trial_obama/ -O --test # only render the head and use GT image for torso

Namespace(path='data/obama/', O=True, test=True, test_train=False, data_range=[0, -1], workspace='trial_obama/', seed=0, iters=200000, lr=0.01, lr_net=0.001, ckpt='latest', num_rays=65536, cuda_ray=True, max_steps=16, num_steps=16, upsample_steps=0, update_extra_interval=16, max_ray_batch=4096, warmup_step=10000, amb_aud_loss=1, amb_eye_loss=1, unc_loss=1, lambda_amb=0.0001, fp16=True, bg_img='', fbg=False, exp_eye=True, fix_eye=-1, smooth_eye=False, torso_shrink=0.8, color_space='srgb', preload=0, bound=1, scale=4, offset=[0, 0, 0], dt_gamma=0.00390625, min_near=0.05, density_thresh=10, density_thresh_torso=0.01, patch_size=1, init_lips=False, finetune_lips=False, smooth_lips=False, torso=False, head_ckpt='', gui=False, W=450, H=450, radius=3.35, fovy=21.24, max_spp=1, att=2, aud='', emb=False, ind_dim=4, ind_num=10000, ind_dim_torso=8, amb_dim=2, part=False, part2=False, train_camera=False, smooth_path=False, smooth_path_window=7, asr=False, asr_wav='', asr_play=False, asr_model='deepspeech', asr_save_feats=False, fps=50, l=10, m=50, r=10)
Traceback (most recent call last):
  File "/workspace/ER-NeRF/gridencoder/grid.py", line 10, in &lt;module&gt;
    import _gridencoder as _backend
ModuleNotFoundError: No module named '_gridencoder'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
    subprocess.run(
  File "/opt/conda/envs/ernerf/lib/python3.10/subprocess.py", line 526, 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:

Traceback (most recent call last):
  File "/workspace/ER-NeRF/main.py", line 149, in &lt;module&gt;
    model = NeRFNetwork(opt)
  File "/workspace/ER-NeRF/nerf_triplane/network.py", line 127, in __init__
    self.encoder_xy, self.in_dim_xy = get_encoder('hashgrid', input_dim=2, num_levels=self.num_levels, level_dim=self.level_dim, base_resolution=64, log2_hashmap_size=14, desired_resolution=512 * self.bound)
  File "/workspace/ER-NeRF/encoding.py", line 24, in get_encoder
    from gridencoder import GridEncoder
  File "/workspace/ER-NeRF/gridencoder/__init__.py", line 1, in &lt;module&gt;
    from .grid import GridEncoder
  File "/workspace/ER-NeRF/gridencoder/grid.py", line 12, in &lt;module&gt;
    from .backend import _backend
  File "/workspace/ER-NeRF/gridencoder/backend.py", line 31, in &lt;module&gt;
    _backend = load(name='_grid_encoder',
  File "/opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1202, in load
    return _jit_compile(
  File "/opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1425, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1537, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "/opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension '_grid_encoder': [1/2] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/TH -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /opt/conda/envs/ernerf/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -c /workspace/ER-NeRF/gridencoder/src/gridencoder.cu -o gridencoder.cuda.o 
FAILED: gridencoder.cuda.o 
/usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=_grid_encoder -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/TH -isystem /opt/conda/envs/ernerf/lib/python3.10/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /opt/conda/envs/ernerf/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -c /workspace/ER-NeRF/gridencoder/src/gridencoder.cu -o gridencoder.cuda.o 
/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U, C=1U]" 
(350): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U, C=2U]" 
(351): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U, C=4U]" 
(352): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U, C=8U]" 
(353): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U, C=1U]" 
(350): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U, C=2U]" 
(351): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U, C=4U]" 
(352): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U, C=8U]" 
(353): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=float]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U, C=1U]" 
(350): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U, C=2U]" 
(351): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U, C=4U]" 
(352): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U, C=8U]" 
(353): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=c10::Half]" 
(443): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(194): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "void kernel_grid&lt;scalar_t,D,C&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U, C=1U]" 
(350): here
            instantiation of "void kernel_grid_wrapper&lt;scalar_t,D&gt;(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=1U]" 
(367): here
            instantiation of "void grid_encode_forward_cuda(const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(443): here

(.....)


/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=4U, C=2U, N_C=2U]" 
(388): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=4U]" 
(416): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

(....)

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=4U, C=4U, N_C=2U]" 
(392): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=4U]" 
(416): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=4U, C=8U, N_C=2U]" 
(396): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=4U]" 
(416): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=5U, C=1U, N_C=1U]" 
(384): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=5U]" 
(417): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=5U, C=2U, N_C=2U]" 
(388): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=5U]" 
(417): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=5U, C=4U, N_C=2U]" 
(392): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=5U]" 
(417): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

/workspace/ER-NeRF/gridencoder/src/gridencoder.cu(309): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (double *, double)
          detected during:
            instantiation of "void kernel_grid_backward&lt;scalar_t,D,C,N_C&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, float, uint32_t, uint32_t, __nv_bool) [with scalar_t=double, D=5U, C=8U, N_C=2U]" 
(396): here
            instantiation of "void kernel_grid_backward_wrapper&lt;scalar_t,D&gt;(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double, D=5U]" 
(417): here
            instantiation of "void grid_encode_backward_cuda(const scalar_t *, const float *, const scalar_t *, const int *, scalar_t *, uint32_t, uint32_t, uint32_t, uint32_t, float, uint32_t, scalar_t *, scalar_t *, uint32_t, __nv_bool) [with scalar_t=double]" 
(474): here

21 errors detected in the compilation of "/workspace/ER-NeRF/gridencoder/src/gridencoder.cu".
ninja: build stopped: subcommand failed.
</code></pre>

ptrblck: <p>Based on the <a href="https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#atomicadd">programming guide</a> and <a href="https://github.com/ashawkey/torch-ngp/issues/69#issuecomment-1153390422">this issue</a> your GPU architecture might not support the operation. Could this be the case?</p>