VITA-Group / FSGS

[ECCV 2024]"FSGS: Real-Time Few-Shot View Synthesis using Gaussian Splatting", Zehao Zhu*, Zhiwen Fan*, Yifan Jiang, Zhangyang Wang
Other
376 stars 28 forks source link

Install simple-knn errors #21

Closed Ballzy0706 closed 9 months ago

Ballzy0706 commented 9 months ago

Hi, Thanks for your great work and code! I met a question when i use the conda env create --file environment.yml to create FSGS environment.

Processing g:\fsgs-main\submodules\simple-knn
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: simple-knn
  Building wheel for simple-knn (setup.py): started
  Building wheel for simple-knn (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.
  exit code: 1

  [27 lines of output]
  running bdist_wheel
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
    warnings.warn(msg.format('we could not find ninja.'))
  running build
  running build_ext
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.3) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
  building 'simple_knn._C' extension
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\TH -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\dell\anaconda3\envs\FSGS\include -IC:\Users\dell\anaconda3\envs\FSGS\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" /EHsc /Tpext.cpp /Fobuild\temp.win-amd64-cpython-38\Release\ext.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /wd4624 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
  ext.cpp
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\c10/macros/Macros.h(143): warning C4067: Ԥ      ָ            - Ӧ   뻻 з 
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\c10/core/TensorImpl.h(2214): warning C4805:   |  :  ڲ    н    ͡ uintptr_t       ͡ bool    ϲ   ȫ
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\pybind11\detail/common.h(108): warning C4005:   HAVE_SNPRINTF  :    ض   
  C:\Users\dell\anaconda3\envs\FSGS\include\pyerrors.h(315): note:  μ   HAVE_SNPRINTF    ǰһ      
  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc" -c simple_knn.cu -o build\temp.win-amd64-cpython-38\Release\simple_knn.obj -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\TH -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\dell\anaconda3\envs\FSGS\include -IC:\Users\dell\anaconda3\envs\FSGS\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use-local-env
  simple_knn.cu(23): warning C4005:   __CUDACC__  :    ض   
  simple_knn.cu: note:  μ   __CUDACC__    ǰһ      
  simple_knn.cu(23): warning C4005:   __CUDACC__  :    ض   
  simple_knn.cu: note:  μ   __CUDACC__    ǰһ      
  G:\FSGS-main\submodules\simple-knn\simple_knn.h(18): error: identifier "int32_t" is undefined

  simple_knn.cu(192): error: declaration is incompatible with "void SimpleKNN::knn(int, float3 *, float *, <error-type> *)"
  G:\FSGS-main\submodules\simple-knn\simple_knn.h(18): here

  2 errors detected in the compilation of "simple_knn.cu".
  simple_knn.cu
  error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3\\bin\\nvcc.exe' failed with exit code 2
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for simple-knn
  Running setup.py clean for simple-knn
Failed to build simple-knn
Installing collected packages: simple-knn
  Running setup.py install for simple-knn: started
  Running setup.py install for simple-knn: finished with status 'error'
  error: subprocess-exited-with-error

  Running setup.py install for simple-knn did not run successfully.
  exit code: 1

  [43 lines of output]
  running install
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  !!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  running build
  running build_ext
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
    warnings.warn(msg.format('we could not find ninja.'))
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.3) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
  building 'simple_knn._C' extension
  creating build
  creating build\temp.win-amd64-cpython-38
  creating build\temp.win-amd64-cpython-38\Release
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\TH -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\dell\anaconda3\envs\FSGS\include -IC:\Users\dell\anaconda3\envs\FSGS\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" /EHsc /Tpext.cpp /Fobuild\temp.win-amd64-cpython-38\Release\ext.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /wd4624 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
  ext.cpp
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\c10/macros/Macros.h(143): warning C4067: Ԥ      ָ            - Ӧ   뻻 з 
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\c10/core/TensorImpl.h(2214): warning C4805:   |  :  ڲ    н    ͡ uintptr_t       ͡ bool    ϲ   ȫ
  C:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\pybind11\detail/common.h(108): warning C4005:   HAVE_SNPRINTF  :    ض   
  C:\Users\dell\anaconda3\envs\FSGS\include\pyerrors.h(315): note:  μ   HAVE_SNPRINTF    ǰһ      
  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc" -c simple_knn.cu -o build\temp.win-amd64-cpython-38\Release\simple_knn.obj -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\TH -IC:\Users\dell\anaconda3\envs\FSGS\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\dell\anaconda3\envs\FSGS\include -IC:\Users\dell\anaconda3\envs\FSGS\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use-local-env
  simple_knn.cu(23): warning C4005:   __CUDACC__  :    ض   
  simple_knn.cu: note:  μ   __CUDACC__    ǰһ      
  simple_knn.cu(23): warning C4005:   __CUDACC__  :    ض   
  simple_knn.cu: note:  μ   __CUDACC__    ǰһ      
  G:\FSGS-main\submodules\simple-knn\simple_knn.h(18): error: identifier "int32_t" is undefined

  simple_knn.cu(192): error: declaration is incompatible with "void SimpleKNN::knn(int, float3 *, float *, <error-type> *)"
  G:\FSGS-main\submodules\simple-knn\simple_knn.h(18): here

  2 errors detected in the compilation of "simple_knn.cu".
  simple_knn.cu
  error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3\\bin\\nvcc.exe' failed with exit code 2
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

simple-knn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: There was an error checking the latest version of pip.

Above info is the error. Intuitively, it doesn't recognise 'int32_t', which wasn't in the original version of simple-knn. I try to varify cuda versions to correct it, include cuda113, cuda116 and cuda118, all of them doesn't work. Any suggestions, please?

Ballzy0706 commented 9 months ago

I solved this issue by adding one line in simple_knn.h file.

#ifndef SIMPLEKNN_H_INCLUDED
#define SIMPLEKNN_H_INCLUDED

is modified to

#ifndef SIMPLEKNN_H_INCLUDED
#define SIMPLEKNN_H_INCLUDED
#include <stdint.h>