-
Hi community, the last step "cmake --build build --config RelWithDebInfo -j 16" generate some errors. `tiny-cuda-nn\src\fully_fused_mlp.cu(416): error : name followed by "::" must be a class or namespace nam C:\AI\TinyCuda\tiny-cuda-nn\src\fully_fused_mlp.cu(496): error : name followed by "::" must be a class or namespace nam C:\AI\TinyCuda\tiny-cuda-nn\src\fully_fused_mlp.cu(496): error : name followed by "::" must be a class or namespace nam C:\AI\TinyCuda\tiny-cuda-nn\include\tiny-cuda-nn/encodings/grid.h(249): error : no operator "+=" matches these operands :\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.6.t My environment: Let me know if you know this issue and feel free to share tips, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
I am having this issue as well and my environment is exactly identical to yours. |
Beta Was this translation helpful? Give feedback.
-
It looks like CMake generated Unfortunately, everything seems to be working fine my machine on the latest CMake, CUDA, and VS 2019, so I can't easily look for a fix. Shot in the dark: perhaps hardcoding the appropriate flags list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_86,code=\"sm_86,compute_86\"") near the top of |
Beta Was this translation helpful? Give feedback.
-
Thank you, hardcoding the flags seems to work! If anyone like me finds themselves wondering how to escape the quotes correctly, I ended up using: |
Beta Was this translation helpful? Give feedback.
-
I confirm! Works like a charm. |
Beta Was this translation helpful? Give feedback.
-
I'm using a GeForce RTX 4000 and setting it to
worked for me! |
Beta Was this translation helpful? Give feedback.
It looks like CMake generated
sm_52,compute_52
nvcc arguments despite having detected your GPU architecture correctly (-DTCNN_MIN_GPU_ARCH=86
). This is puzzling to me and shouldn't happen -- the correct arch arguments would besm_86,compute_86
.Unfortunately, everything seems to be working fine my machine on the latest CMake, CUDA, and VS 2019, so I can't easily look for a fix.
Shot in the dark: perhaps hardcoding the appropriate flags
near the top of
instant-ngp/CMakeLists.txt
andinstant-ngp/dependencies/tiny-cuda-nn/CMakeLists.txt
will fix it on your systems.