oppo-us-research / NeuRBF

MIT License
303 stars 17 forks source link

pip install .时出现问题 #7

Closed wangchaofan2018 closed 1 year ago

wangchaofan2018 commented 1 year ago

你好,我使用的是Ubuntu22.03,cuda版本是11.8 安装流程按readme执行 g++版本是11.3.0 torch版本是2.1.0+cu118 (按cu117安装会报错显示安装的torch版本匹配cuda12.0),但是在装第三方库的时候出现错误。报错信息如下所示

pip install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: gridencoder
  Building wheel for gridencoder (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [834 lines of output]
      running bdist_wheel
      running build
      running build_ext
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building '_gridencoder' extension
      Emitting ninja build file /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/2] /usr/local/cuda-11.8/bin/nvcc  -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin gcc
      FAILED: /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o
      /usr/local/cuda-11.8/bin/nvcc  -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin gcc
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/string_view.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/StringUtil.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/Exception.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Generator.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Context.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/cuda/CUDAContext.h:18,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:5:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch
         27 | #error You need C++17 to compile PyTorch
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:6:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:6:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen.
          4 | #error C++17 or later compatible compiler is required to use ATen.
            |  ^~~~~
      [2/2] g++ -MMD -MF /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -I/home/wangcf/anaconda3/envs/neurbf/include -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -fPIC -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o
      g++ -MMD -MF /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -I/home/wangcf/anaconda3/envs/neurbf/include -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -fPIC -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/string_view.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/StringUtil.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/Exception.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/core/Device.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch
         27 | #error You need C++17 to compile PyTorch
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen.
          4 | #error C++17 or later compatible compiler is required to use ATen.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/typeid.h:17,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/core/ScalarTypeToTypeMeta.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:18,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/irange.h: In member function ‘bool c10::detail::integer_iterator<I, one_sided, <anonymous> >::operator==(const c10::detail::integer_iterator<I, one_sided, <anonymous> >&) const’:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/irange.h:50:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         50 |     if constexpr (one_sided) {
            |        ^~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h:1499,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/List.h:490,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/IListRef_inl.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/IListRef.h:632,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/WrapDimUtils.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/TensorNames.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/NamedTensorUtils.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h: In lambda function:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:12: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |            ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:30: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’?
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |                              ^~~~~~~~~~~~~~~~
            |                              is_convertible
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:91: error: expected ‘(’ before ‘,’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |                                                                                           ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:111: error: expected primary-expression before ‘>’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |
    ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:112: error: expected primary-expression before ‘)’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |
     ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1062:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
       1062 |           auto [ivalue, storages] = cb(parentFut);
            |                ^
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/KernelFunction_impl.h:1,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:251,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/op_registration/op_registration.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/library.h:68,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd_not_implemented_fallback.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/impl/boxing.h: In static member function ‘static Result c10::impl::BoxedKernelWrapper<Result(Args ...), typename std::enable_if<((c10::guts::conjunction<c10::guts::disjunction<std::is_constructible<c10::IValue, typename std::decay<Args>::type>, std::is_same<c10::TensorOptions, typename std::decay<Args>::type> >...>::value && c10::guts::conjunction<c10::guts::disjunction<c10::impl::has_ivalue_to<T, void>, std::is_same<void, ReturnType> >, c10::guts::negation<std::is_lvalue_reference<_Tp> > >::value) && (! c10::impl::is_tuple_of_mutable_tensor_refs<Result>::value)), void>::type>::call(const c10::BoxedKernel&, const c10::OperatorHandle&, c10::DispatchKeySet, Args ...)’:
      )
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:517:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        517 |   AT_DISPATCH_CASE(SCALARTYPE3, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:524:7: note: in expansion of macro ‘AT_DISPATCH_CASE_ALL_TYPES_AND3’
        524 |       AT_DISPATCH_CASE_ALL_TYPES_AND3(                      \
            |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/detail/TensorDataContainer.h:307:9: note: in expansion of macro ‘AT_DISPATCH_ALL_TYPES_AND3’
        307 |         AT_DISPATCH_ALL_TYPES_AND3(
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:12,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h: In static member function ‘static Return c10::Dispatcher::callWithDispatchKeySlowPath(const c10::TypedOperatorHandle<Return(Args ...)>&, at::StepCallbacks&, c10::DispatchKeySet, const c10::KernelFunction&, Args ...)’:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:597:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
        597 |   if constexpr (num_boxed_args != 0) {
            |      ^~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h: In lambda function:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:56:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         56 |     if constexpr (!at::should_include_kernel_dtype(   \
            |        ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:221:7: note: in definition of macro ‘AT_DISPATCH_SWITCH’
        221 |       __VA_ARGS__                                                           \
            |       ^~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:68:5: note: in expansion of macro ‘AT_PRIVATE_CHECK_SELECTIVE_BUILD’
         68 |     AT_PRIVATE_CHECK_SELECTIVE_BUILD(enum_type);                        \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:74:3: note: in expansion of macro ‘AT_PRIVATE_CASE_TYPE_USING_HINT’
         74 |   AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:233:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        233 |   AT_DISPATCH_CASE(at::ScalarType::Double, __VA_ARGS__) \
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:237:34: note: in expansion of macro ‘AT_DISPATCH_CASE_FLOATING_TYPES’
        237 |   AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_FLOATING_TYPES(__VA_ARGS__))
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h:895:27: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’
        895 |     attn_output_weights = AT_DISPATCH_FLOATING_TYPES(
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:56:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         56 |     if constexpr (!at::should_include_kernel_dtype(   \
            |        ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:221:7: note: in definition of macro ‘AT_DISPATCH_SWITCH’
        221 |       __VA_ARGS__                                                           \
            |       ^~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:68:5: note: in expansion of macro ‘AT_PRIVATE_CHECK_SELECTIVE_BUILD’
         68 |     AT_PRIVATE_CHECK_SELECTIVE_BUILD(enum_type);                        \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:74:3: note: in expansion of macro ‘AT_PRIVATE_CASE_TYPE_USING_HINT’
         74 |   AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:234:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        234 |   AT_DISPATCH_CASE(at::ScalarType::Float, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:237:34: note: in expansion of macro ‘AT_DISPATCH_CASE_FLOATING_TYPES’
        237 |   AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_FLOATING_TYPES(__VA_ARGS__))
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h:895:27: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’
        895 |     attn_output_weights = AT_DISPATCH_FLOATING_TYPES(
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
          subprocess.run(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/subprocess.py", line 528, 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 "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/setup.py", line 32, in <module>
          setup(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 873, in build_extensions
          build_ext.build_extensions(self)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 686, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2116, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gridencoder
  Running setup.py clean for gridencoder
Failed to build gridencoder
ERROR: Could not build wheels for gridencoder, which is required to install pyproject.toml-based projects

请问能否提供一个可行的解决方案?

LansburyCH commented 1 year ago

可以尝试下安装2.0.1+cu117版本的pytorch。另外,报错中出现了多次#error C++17 or later compatible compiler is required to use ATen,或许是编译器不支持C++17

wangchaofan2018 commented 1 year ago

我换了台电脑后解决了问题,同时遇到了一个新的问题,在使用lego合成数据集和自制llff数据集训练时,都出现了在生产网格点后程序被kill的问题,无报错显示,日志如下所示。

(neurbf) root@autodl-container-b06911993c-e262572c:~/github/NeuRBF# python main_nerf.py --config_init configs/nerf_tensorf/nerf_synthetic_init.py --config configs/nerf_tensorf/nerf_synthetic.py --data_name lego
CUDA_VISIBLE_DEVICES set to 0
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic.py', 'expname': 'lego_rbf_tensorf-v0', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [14, 16], 'n_lamb_sh': [28, 32], 'data_dim_color': None, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': 3, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': True, 'save_video': True, 'save_ckpt': True, 'resol_min': 16, 'n_level': 2, 'level_types': ['vm'], 'btn_freq': [0.3, 10.0], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': False, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v0
Get init data...
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'expname': 'lego_rbf_tensorf-v0', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [16], 'n_lamb_sh': [48], 'data_dim_color': 27, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': -1, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': False, 'save_video': False, 'save_ckpt': False, 'resol_min': 16, 'n_level': 1, 'level_types': ['vm'], 'btn_freq': [], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': True, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v0
Loading data train (100): 100%|███████████████████████████████████████████████████████| 100/100 [00:02<00:00, 41.06it/s]
Loading data test (200): 100%|████████████████████████████████████████████████████████| 200/200 [00:03<00:00, 50.71it/s]
n_kernel: -155240
aabb tensor([-1.5000, -1.5000, -1.5000,  1.5000,  1.5000,  1.5000], device='cuda:0')
grid size [128, 128, 128]
sampling step size:  tensor(0.0118, device='cuda:0')
sampling number:  440
pos_pe 6 view_pe -1 fea_pe -1
RenderingNet(
  (ree_function): RenderingEquationEncoding()
  (spatial_mlp): Sequential(
    (0): Linear(in_features=27, out_features=256, bias=True)
    (1): GELU(approximate='none')
    (2): Linear(in_features=256, out_features=256, bias=True)
    (3): GELU(approximate='none')
    (4): Linear(in_features=256, out_features=265, bias=True)
  )
  (asg_mlp): Sequential(
    (0): Linear(in_features=16, out_features=64, bias=True)
  )
  (directional_mlp): Sequential(
    (0): Linear(in_features=385, out_features=256, bias=True)
    (1): GELU(approximate='none')
    (2): Linear(in_features=256, out_features=256, bias=True)
    (3): GELU(approximate='none')
    (4): Linear(in_features=256, out_features=256, bias=True)
    (5): GELU(approximate='none')
    (6): Linear(in_features=256, out_features=256, bias=True)
    (7): GELU(approximate='none')
    (8): Linear(in_features=256, out_features=256, bias=True)
    (9): GELU(approximate='none')
    (10): Linear(in_features=256, out_features=3, bias=True)
  )
)
Num feature parameters: 3170304
Num MLP parameters: 508796
lr decay 0.1 30000
========> filtering rays ...
Ray filtering done! takes 0.6941025257110596 s. ray mask ratio: 0.9975844621658325
initial Ortho_reg_weight 0.0
initial L1_reg_weight 1.3333333333333335e-05
initial TV_weight density: 0.0 appearance: 0.0
Iteration 00990: train_psnr = 26.66 test_psnr = 0.00 mse = 0.002143:   3%|▎         | 990/30000 [00:48<16:00, 30.20it/s]Generate grid points: 0.32696008682250977
Get density and features at grid points: 11.300612211227417
Iteration 00990: train_psnr = 26.66 test_psnr = 0.00 mse = 0.002143:   3%|▎         | 999/30000 [01:00<29:10, 16.56it/s]
Training...
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic.py', 'expname': 'lego_rbf_tensorf-v1', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [14, 16], 'n_lamb_sh': [28, 32], 'data_dim_color': None, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': 3, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': True, 'save_video': True, 'save_ckpt': True, 'resol_min': 16, 'n_level': 2, 'level_types': ['vm'], 'btn_freq': [0.3, 10.0], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': False, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v1
Loading data train (100): 100%|███████████████████████████████████████████████████████| 100/100 [00:02<00:00, 48.30it/s]
Loading data test (200): 100%|████████████████████████████████████████████████████████| 200/200 [00:04<00:00, 47.57it/s]
n_kernel: 41564
aabb tensor([-1.5000, -1.5000, -1.5000,  1.5000,  1.5000,  1.5000], device='cuda:0')
grid size [128, 128, 128]
sampling step size:  tensor(0.0118, device='cuda:0')
sampling number:  440
Generate grid points: 0.012170553207397461
Initializing kc0...
Killed
zhouilu commented 1 year ago

我换了台电脑后解决了问题,同时遇到了一个新的问题,在使用lego合成数据集和自制llff数据集训练时,都出现了在生产网格点后程序被kill的问题,无报错显示,日志如下所示。

(neurbf) root@autodl-container-b06911993c-e262572c:~/github/NeuRBF# python main_nerf.py --config_init configs/nerf_tensorf/nerf_synthetic_init.py --config configs/nerf_tensorf/nerf_synthetic.py --data_name lego
CUDA_VISIBLE_DEVICES set to 0
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic.py', 'expname': 'lego_rbf_tensorf-v0', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [14, 16], 'n_lamb_sh': [28, 32], 'data_dim_color': None, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': 3, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': True, 'save_video': True, 'save_ckpt': True, 'resol_min': 16, 'n_level': 2, 'level_types': ['vm'], 'btn_freq': [0.3, 10.0], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': False, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v0
Get init data...
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'expname': 'lego_rbf_tensorf-v0', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [16], 'n_lamb_sh': [48], 'data_dim_color': 27, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': -1, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': False, 'save_video': False, 'save_ckpt': False, 'resol_min': 16, 'n_level': 1, 'level_types': ['vm'], 'btn_freq': [], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': True, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v0
Loading data train (100): 100%|███████████████████████████████████████████████████████| 100/100 [00:02<00:00, 41.06it/s]
Loading data test (200): 100%|████████████████████████████████████████████████████████| 200/200 [00:03<00:00, 50.71it/s]
n_kernel: -155240
aabb tensor([-1.5000, -1.5000, -1.5000,  1.5000,  1.5000,  1.5000], device='cuda:0')
grid size [128, 128, 128]
sampling step size:  tensor(0.0118, device='cuda:0')
sampling number:  440
pos_pe 6 view_pe -1 fea_pe -1
RenderingNet(
  (ree_function): RenderingEquationEncoding()
  (spatial_mlp): Sequential(
    (0): Linear(in_features=27, out_features=256, bias=True)
    (1): GELU(approximate='none')
    (2): Linear(in_features=256, out_features=256, bias=True)
    (3): GELU(approximate='none')
    (4): Linear(in_features=256, out_features=265, bias=True)
  )
  (asg_mlp): Sequential(
    (0): Linear(in_features=16, out_features=64, bias=True)
  )
  (directional_mlp): Sequential(
    (0): Linear(in_features=385, out_features=256, bias=True)
    (1): GELU(approximate='none')
    (2): Linear(in_features=256, out_features=256, bias=True)
    (3): GELU(approximate='none')
    (4): Linear(in_features=256, out_features=256, bias=True)
    (5): GELU(approximate='none')
    (6): Linear(in_features=256, out_features=256, bias=True)
    (7): GELU(approximate='none')
    (8): Linear(in_features=256, out_features=256, bias=True)
    (9): GELU(approximate='none')
    (10): Linear(in_features=256, out_features=3, bias=True)
  )
)
Num feature parameters: 3170304
Num MLP parameters: 508796
lr decay 0.1 30000
========> filtering rays ...
Ray filtering done! takes 0.6941025257110596 s. ray mask ratio: 0.9975844621658325
initial Ortho_reg_weight 0.0
initial L1_reg_weight 1.3333333333333335e-05
initial TV_weight density: 0.0 appearance: 0.0
Iteration 00990: train_psnr = 26.66 test_psnr = 0.00 mse = 0.002143:   3%|▎         | 990/30000 [00:48<16:00, 30.20it/s]Generate grid points: 0.32696008682250977
Get density and features at grid points: 11.300612211227417
Iteration 00990: train_psnr = 26.66 test_psnr = 0.00 mse = 0.002143:   3%|▎         | 999/30000 [01:00<29:10, 16.56it/s]
Training...
{'config_init': 'configs/nerf_tensorf/nerf_synthetic_init.py', 'config': 'configs/nerf_tensorf/nerf_synthetic.py', 'expname': 'lego_rbf_tensorf-v1', 'basedir': '/root/autodl-tmp', 'add_timestamp': 0, 'datadir': '/root/autodl-tmp/lego', 'data_name': 'lego', 'progress_refresh_rate': 10, 'with_depth': False, 'downsample_train': 1.0, 'downsample_test': 1.0, 'model_name': 'nerf_tensorf.network.TensorVMSplitRBF', 'batch_size': 4096, 'batch_size_init': 4096, 'n_iters': 30000, 'dataset_name': 'blender', 'lr_init': 0.02, 'lr_basis': 0.001, 'lr_decay_iters': -1, 'lr_decay_target_ratio': 0.1, 'lr_upsample_reset': 1, 'L1_weight_inital': 1.3333333333333335e-05, 'L1_weight_rest': 0.0, 'Ortho_weight': 0.0, 'TV_weight_density': 0.0, 'TV_weight_app': 0.0, 'n_lamb_sigma': [14, 16], 'n_lamb_sh': [28, 32], 'data_dim_color': None, 'rm_weight_mask_thre': 0.0001, 'alpha_mask_thre': 0.0001, 'distance_scale': 25, 'density_shift': -10, 'shadingMode': 'ASG_Fea', 'pos_pe': 6, 'view_pe': 3, 'fea_pe': -1, 'featureC': 256, 'ckpt': None, 'render_only': 0, 'render_test': 1, 'render_train': 0, 'render_path': 0, 'export_mesh': 0, 'lindisp': False, 'perturb': 1.0, 'accumulate_decay': 0.998, 'fea2denseAct': 'softplus', 'ndc_ray': 0, 'nSamples': 1000000.0, 'step_ratio': 0.5, 'white_bkgd': False, 'N_voxel_init': 2097152, 'N_voxel_final': 8000000, 'upsamp_list': [2000, 3000, 4000, 5500, 7000], 'update_AlphaMask_list': [2000, 4000], 'idx_view': 0, 'N_vis': 5, 'vis_every': 10000, 'add_version_id': True, 'N_voxel_real_init': 2097152, 'N_voxel_real_final': 42875000, 'shrink_0': True, 'no_upsample': False, 'scale_reso': True, 'fp16': True, 'save_img': True, 'save_video': True, 'save_ckpt': True, 'resol_min': 16, 'n_level': 2, 'level_types': ['vm'], 'btn_freq': [0.3, 10.0], 'lr_basis_mat': 0.001, 'lr_g_factor': 0.02, 'Ro_weight': 0.3, 'rbf_config': {'get_init_data': False, 'init_steps': 1000, 'init_data_fp': 'init_data/lego_1000.pt', 'init_rbf': True, 's_dims': 'aabb', 'ref_config': {'N_voxel_final': 27000000, 'n_lamb_sigma': [16], 'n_lamb_sh': [48]}, 'rbf_type': 'ivq_a', 'rbf_lc0_normalize': False, 'n_kernel': 'auto', 'point_nn_kernel': 5, 'ks_alpha': 1, 'lc0_dim': 32, 'lcd0_dim': 0, 'pe_lc0_freq': [], 'pe_lc0_rbf_freq': [], 'pe_lc0_rbf_keep': 0, 'lc_init': [-1e-06, 1e-06], 'lcd_init': [-0.0, 0.0], 'lcb_init': None, 'rbf_suffixes': ['0'], 'fix_params': ['kc0', 'ks0'], 'kc_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'reg_sampling': 0, 'weight_exp': 1, 'weight_thres': 0, 'n_iter': 10, 'weight_src': 'alpha_feat_grad'}}, 'kw_init_config': {'0': {'type': 'v3', 'points_sampling': 1, 'alpha': 0.3, 'weight_exp': 1, 'weight_thres': 0, 'weight_src': 'alpha_feat_grad'}}, 'lr_config': {'lc0': 0.02, 'lcd0': 0.02, 'lcb0': 0.02, 'kc0': 3e-05, 'ks0': 0.01}}}
lego_rbf_tensorf-v1
Loading data train (100): 100%|███████████████████████████████████████████████████████| 100/100 [00:02<00:00, 48.30it/s]
Loading data test (200): 100%|████████████████████████████████████████████████████████| 200/200 [00:04<00:00, 47.57it/s]
n_kernel: 41564
aabb tensor([-1.5000, -1.5000, -1.5000,  1.5000,  1.5000,  1.5000], device='cuda:0')
grid size [128, 128, 128]
sampling step size:  tensor(0.0118, device='cuda:0')
sampling number:  440
Generate grid points: 0.012170553207397461
Initializing kc0...
Killed

同样遇到该问题,可能是内存不够?尝试减小batch,但仍未解决.. Initializing kc0... RuntimeError: [enforce fail at alloc_cpu.cpp:66] . DefaultCPUAllocator: can't allocate memory: you tried to allocate 43486543872 bytes. Error code 12 (Cannot allocate memory)

wangchaofan2018 commented 1 year ago

我用的是rtx3090 128GB内存,之前也有怀疑这个问题,然后对这数值进行了监控,并没有出现内存溢出或者显存溢出的情况。

LansburyCH commented 1 year ago

可以试试降低query_chunked函数的chunk_size输入

wangchaofan2018 commented 1 year ago

试过了,并没有作用。

LansburyCH commented 1 year ago

请参考这里