19reborn / NeuS2

[ICCV 2023] Official code for NeuS2
Other
628 stars 42 forks source link

error: identifier "FullyFusedMLP" is undefined #15

Closed Luh1124 closed 1 year ago

Luh1124 commented 1 year ago

I encountered an error while executing "cmake --build build --config RelWithDebInfo -j": Graphics card: 1080ti. cuda:11.8 CUDA architectures: 61 (nerf) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 3%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/context.c.o [ 5%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/common_device.cu.o [ 7%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/monitor.c.o [ 3%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o [ 9%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/cpp_api.cu.o [ 10%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/window.c.o [ 12%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/init.c.o [ 14%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/input.c.o [ 16%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/vulkan.c.o [ 18%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/cutlass_mlp.cu.o [ 20%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/x11_init.c.o [ 21%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/x11_monitor.c.o [ 25%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/encoding.cu.o [ 25%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/loss.cu.o [ 29%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/object.cu.o [ 29%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o [ 30%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/x11_window.c.o [ 32%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o [ 34%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/posix_time.c.o [ 36%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/reduce_sum.cu.o [ 38%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/xkb_unicode.c.o [ 40%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/posix_thread.c.o [ 41%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/glx_context.c.o [ 43%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/egl_context.c.o [ 45%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/osmesa_context.c.o [ 47%] Building C object dependencies/glfw/src/CMakeFiles/glfw_objects.dir/linux_joystick.c.o [ 47%] Built target glfw_objects /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: identifier "FullyFusedMLP" is undefined

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(115): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(115): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(116): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(116): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(117): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(117): error: the global scope has no "REQUIRED_ALIGNMENT"

9 errors detected in the compilation of "/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu". make[2]: [dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:167: dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:254: dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2 make: [Makefile:91: all] Error 2

Luh1124 commented 1 year ago

However, during the compilation of instant-ngp, everything was normal except for the warning message "CMake Warning at dependencies/tiny-cuda-nn/CMakeLists.txt:194 (message): Fully fused MLPs do not support GPU architectures of 70 or less. Falling back to CUTLASS MLPs. Remove GPU architectures 70 and lower to allow maximum performance"

19reborn commented 1 year ago

Hi @Luh1124 , Thanks for pointing out this error. I just updated a new commit for the neus2_tcnn. Could you please use the lateset version and try compiling it?

wangjialuu commented 1 year ago

I got the same error. And already pull the newest commit for neus2_tcnn.

luh0502 commented 1 year ago

Hi @Luh1124 , Thanks for pointing out this error. I just updated a new commit for the neus2_tcnn. Could you please use the lateset version and try compiling it?

I have pulled the latest version of the repository, but I still have the same error.

(base) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 29%] Built target glfw_objects [ 30%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o [ 34%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o [ 34%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/object.cu.o [ 36%] Building CUDA object dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/reduce_sum.cu.o /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: identifier "FullyFusedMLP" is undefined

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(114): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(115): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(115): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(116): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(116): error: the global scope has no "REQUIRED_ALIGNMENT"

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(117): error: type name is not allowed

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu(117): error: the global scope has no "REQUIRED_ALIGNMENT"

9 errors detected in the compilation of "/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/dependencies/neus2_tcnn/src/network.cu". make[2]: [dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:167: dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:254: dependencies/neus2_tcnn/src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2 make: [Makefile:91: all] Error 2

luh0502 commented 1 year ago

I tried deploying the environment on a 3090 and encountered a new error. Could this be related to the version of OptiX?Under the same configuration, the deployment of instant-ngp is successful.

cmake:3.25.0 cuda:11.8 Optix:8.0 gpu:3090 24G

(nerf) lh@omnisky:~/repo2/lh/code/lh/4.NRC/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 25%] Built target optix_program [ 31%] Built target glfw_objects [ 51%] Built target tiny-cuda-nn [ 53%] Building CUDA object CMakeFiles/ngp.dir/src/triangle_bvh.cu.o /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(75): error: identifier "optixModuleCreateFromPTX" is undefined detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(144): error: class "OptixPipelineLinkOptions" has no member "debugLevel" detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(159): error: too few arguments in function call detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

3 errors detected in the compilation of "/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu". CMakeFiles/ngp.dir/build.make:386: recipe for target 'CMakeFiles/ngp.dir/src/triangle_bvh.cu.o' failed make[2]: [CMakeFiles/ngp.dir/src/triangle_bvh.cu.o] Error 1 CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/ngp.dir/all' failed make[1]: [CMakeFiles/ngp.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: ** [all] Error 2 (nerf) lh@omnisky:~/repo2/lh/code/lh/4.NRC/NeuS2$ git submodule sync --recursive Synchronizing submodule url for 'dependencies/neus2_tcnn' Synchronizing submodule url for 'dependencies/neus2_tcnn/dependencies/cutlass' Synchronizing submodule url for 'dependencies/neus2_tcnn/dependencies/fmt' (nerf) lh@omnisky:~/repo2/lh/code/lh/4.NRC/NeuS2$ git submodule update --init --recursive (nerf) lh@omnisky:~/repo2/lh/code/lh/4.NRC/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 5%] Built target optix_program [ 31%] Built target glfw_objects [ 51%] Built target tiny-cuda-nn [ 53%] Building CUDA object CMakeFiles/ngp.dir/src/triangle_bvh.cu.o /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(75): error: identifier "optixModuleCreateFromPTX" is undefined detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char , unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(144): error: class "OptixPipelineLinkOptions" has no member "debugLevel" detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/optix/program.h(159): error: too few arguments in function call detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu(664): here

3 errors detected in the compilation of "/home/lh/repo2/lh/code/lh/4.NRC/NeuS2/src/triangle_bvh.cu". CMakeFiles/ngp.dir/build.make:386: recipe for target 'CMakeFiles/ngp.dir/src/triangle_bvh.cu.o' failed make[2]: [CMakeFiles/ngp.dir/src/triangle_bvh.cu.o] Error 1 CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/ngp.dir/all' failed make[1]: [CMakeFiles/ngp.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2

19reborn commented 1 year ago

Hi @luh0502, the optix problem can be solved as shown in https://github.com/19reborn/NeuS2/issues/5.

19reborn commented 1 year ago

For the compiling error of neus2_tcnn, could you please re-check the codes in network.cu(114)? The correct codes should be

#if TCNN_MIN_GPU_ARCH > 70
        uint32_t n_neurons = network.value("n_neurons", 128u);
        switch (n_neurons) {
            case  16: return FullyFusedMLP<network_precision_t,  16>::REQUIRED_ALIGNMENT();
            case  32: return FullyFusedMLP<network_precision_t,  32>::REQUIRED_ALIGNMENT();
            case  64: return FullyFusedMLP<network_precision_t,  64>::REQUIRED_ALIGNMENT();
            case 128: return FullyFusedMLP<network_precision_t, 128>::REQUIRED_ALIGNMENT();
            default: throw std::runtime_error{std::string{"FullyFusedMLP only supports 16, 32, 64, and 128 neurons, but got "} + std::to_string(n_neurons) + ". Use CutlassMLP instead if this is a requirement."};
        }
#else
        throw std::runtime_error{"FullyFusedMLP was not compiled due to insufficient GPU arch of <=70."};
#endif
SWWdz commented 1 year ago

I have changed the code, but I also get this problem. image image

19reborn commented 1 year ago

Hi @SWWdz, after changing the codes, the error line should be in line 116, but your error is in the line 114. Could you please try removing the build directory and using cmake to compile it again?

SWWdz commented 1 year ago

I use cmake to compile again, but I also get this problem. I use CUDA 11.3; cmake:3.27.0; gpu:TITAN xp 12G image

SWWdz commented 1 year ago

I also get this problem when I delete build directory and run it again. The codes are behind. Can you give me some advice? Thanks!

------------------ 原始邮件 ------------------ 发件人: "19reborn/NeuS2" @.>; 发送时间: 2023年8月31日(星期四) 中午11:33 @.>; @.**@.>; 主题: Re: [19reborn/NeuS2] error: identifier "FullyFusedMLP" is undefined (Issue #15)

Hi @SWWdz, after changing the codes, the error line should be in line 116, but your error is in the line 114. Could you please try removing the build directory and using cmake to compile it again?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Luh1124 commented 1 year ago

For the compiling error of neus2_tcnn, could you please re-check the codes in network.cu(114)? The correct codes should be

#if TCNN_MIN_GPU_ARCH > 70
      uint32_t n_neurons = network.value("n_neurons", 128u);
      switch (n_neurons) {
          case  16: return FullyFusedMLP<network_precision_t,  16>::REQUIRED_ALIGNMENT();
          case  32: return FullyFusedMLP<network_precision_t,  32>::REQUIRED_ALIGNMENT();
          case  64: return FullyFusedMLP<network_precision_t,  64>::REQUIRED_ALIGNMENT();
          case 128: return FullyFusedMLP<network_precision_t, 128>::REQUIRED_ALIGNMENT();
          default: throw std::runtime_error{std::string{"FullyFusedMLP only supports 16, 32, 64, and 128 neurons, but got "} + std::to_string(n_neurons) + ". Use CutlassMLP instead if this is a requirement."};
      }
#else
      throw std::runtime_error{"FullyFusedMLP was not compiled due to insufficient GPU arch of <=70."};
#endif

Thank you, I manually modified the content of network.cu according to https://github.com/19reborn/NeuS2_TCNN/blob/d3a12b91097ddca15f17b1b6dbacb36fa0c768b2/src/network.cu, and now it can compile successfully.

Luh1124 commented 1 year ago

But I encountered new issues after installing Optix and attempting to recompile.

(nerf) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake . -B build -- Targeting GPU architectures: 61;61 CMake Warning at dependencies/neus2_tcnn/CMakeLists.txt:114 (message): Fully fused MLPs do not support GPU architectures of 70 or less. Falling back to CUTLASS MLPs. Remove GPU architectures 70 and lower to allow maximum performance

-- Using X11 for window creation -- OptiX_INSTALL_DIR value: /usr/local/NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64 CMake Deprecation Warning at dependencies/pybind11/CMakeLists.txt:8 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- pybind11 v2.7.1 -- Configuring done (0.3s) -- Generating done (0.3s) -- Build files have been written to: /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/build (nerf) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 5%] Built target optix_program [ 32%] Built target glfw_objects [ 50%] Built target tiny-cuda-nn [ 52%] Building CUDA object CMakeFiles/ngp.dir/src/triangle_bvh.cu.o /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(75): error: identifier "optixModuleCreateFromPTX" is undefined detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(144): error: class "OptixPipelineLinkOptions" has no member "debugLevel" detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(159): error: too few arguments in function call detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Program, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemory &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

3 errors detected in the compilation of "/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu". make[2]: [CMakeFiles/ngp.dir/build.make:387: CMakeFiles/ngp.dir/src/triangle_bvh.cu.o] Error 1 make[1]: [CMakeFiles/Makefile2:201: CMakeFiles/ngp.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

19reborn commented 1 year ago

Hi @Luh1124, you may need to degrade the optix version to 7.6 as shown in https://github.com/19reborn/NeuS2/issues/5.

Luh1124 commented 1 year ago

But I encountered new issues after installing Optix and attempting to recompile.

(nerf) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake . -B build -- Targeting GPU architectures: 61;61 CMake Warning at dependencies/neus2_tcnn/CMakeLists.txt:114 (message): Fully fused MLPs do not support GPU architectures of 70 or less. Falling back to CUTLASS MLPs. Remove GPU architectures 70 and lower to allow maximum performance

-- Using X11 for window creation -- OptiX_INSTALL_DIR value: /usr/local/NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64 CMake Deprecation Warning at dependencies/pybind11/CMakeLists.txt:8 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- pybind11 v2.7.1 -- Configuring done (0.3s) -- Generating done (0.3s) -- Build files have been written to: /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/build (nerf) luh@lihong:~/repo1/repo_8T/code/1.nerf/NeuS2$ cmake --build build --config RelWithDebInfo -j [ 5%] Built target optix_program [ 32%] Built target glfw_objects [ 50%] Built target tiny-cuda-nn [ 52%] Building CUDA object CMakeFiles/ngp.dir/src/triangle_bvh.cu.o /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(75): error: identifier "optixModuleCreateFromPTX" is undefined detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Programngp::Raystab, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemoryngp::Triangle &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(144): error: class "OptixPipelineLinkOptions" has no member "debugLevel" detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Programngp::Raystab, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemoryngp::Triangle &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/optix/program.h(159): error: too few arguments in function call detected during: instantiation of "std::_MakeUniq<_Tp>::__single_object std::make_unique<_Tp,_Args...>(_Args &&...) [with _Tp=ngp::optix::Programngp::Raystab, _Args=<const char *, unsigned long, OptixDeviceContext &>]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(635): here instantiation of "void ngp::TriangleBvhWithBranchingFactor::build_optix(const tcnn::GPUMemoryngp::Triangle &, cudaStream_t) [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(647): here instantiation of "ngp::TriangleBvhWithBranchingFactor::TriangleBvhWithBranchingFactor() [with BRANCHING_FACTOR=4U]" /home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu(664): here

3 errors detected in the compilation of "/home/luh/repo1/repo_8T/code/1.nerf/NeuS2/src/triangle_bvh.cu". make[2]: [CMakeFiles/ngp.dir/build.make:387: CMakeFiles/ngp.dir/src/triangle_bvh.cu.o] Error 1 make[1]: [CMakeFiles/Makefile2:201: CMakeFiles/ngp.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

After deleting the build folder, I can recompile and it should work fine.

Luh1124 commented 1 year ago

Hi @Luh1124, you may need to degrade the optix version to 7.6 as shown in #5.

Thanks