NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more
https://nvlabs.github.io/instant-ngp
Other
15.83k stars 1.9k forks source link

"TCNN_MIN_GPU_ARCH" is undefined #1038

Open dylanhusted opened 1 year ago

dylanhusted commented 1 year ago

We're trying to install instant-ngp on a Windows 10 machine with an NVIDIA GeForce 2080Ti graphics card. We followed this github repo and this tutorial: https://www.youtube.com/watch?v=8pfPUN8NyZE

We are erroring out on the cmake --build build --config RelWithDebInfo -j 16 command. What can we do to resolve this "TCNN_MIN_GPU_ARCH" is undefined error? Updating submodules didn't work for us, which was noted here: https://github.com/NVlabs/instant-ngp/issues/54

C:\ngp\instant-ngp>cmake . -B build
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/1
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Targeting GPU architectures: 75
-- Module support is disabled.
-- Version: 9.0.0
-- Build type:
-- CXX_STANDARD: 14
-- Required features: cxx_variadic
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
CMake Warning at CMakeLists.txt:118 (message):
  Vulkan was not found.  Neural graphics primitives will still compile and
  run correctly, but DLSS will not be supported.

...
C:\ngp\instant-ngp>cmake --build build --config RelWithDebInfo -j 16
Checking Build System
  Building Custom Rule C:/ngp/instant-ngp/dependencies/glfw/src/CMakeLists.txt
  Building Custom Rule C:/ngp/instant-ngp/CMakeLists.txt
  context.c
  init.c
  input.c
  monitor.c
  Compiling CUDA source file ..\src\optix\pathescape.cu...
  Compiling CUDA source file ..\src\op

...

C:\ngp\instant-ngp\dependencies\tiny-cuda-nn\include\tiny-cuda-nn/common.h(52): error : identifier "TCNN_MIN_GPU_ARCH" is undefined [C:\ngp\instant-ngp\
build\optix_program.vcxproj]

CUDACOMPILE : nvcc warning : The -std=c++14 flag is not supported with the configured host compiler. Flag will be ignored. [C:\ngp\instant-ngp\build\opt
ix_program.vcxproj]

...
manaspalaparthi commented 1 year ago

I have got the same error, found any solution?

dylanhusted commented 1 year ago

@manaspalaparthi No unfortunately we had to move on from this because we couldn't find a clear solution

Tom94 commented 1 year ago

Hi, CUDA 10.2 and Visual Studio 2019 in C++14 mode don't seem to play well together. Could you try upgrading CUDA to 11.5 or higher? I've updated the "Requirements" section of the README to reflect this.

thomsontg commented 5 months ago

Can I ask where is TCNN_MIN_CUDA_ARCH defined?

I am trying to append tcnn into my project as a static library and I cant figure out where is this variable defined.