donydchen / mvsplat

🌊 [ECCV'24 Oral] MVSplat: Efficient 3D Gaussian Splatting from Sparse Multi-View Images
https://donydchen.github.io/mvsplat
MIT License
720 stars 33 forks source link

Issue with installing diff-gaussian-raterization-modified. Everything else works fine and get installed. But this package is creating problem. I have Torch with cu118 installed #53

Open Shahid1Malik opened 1 month ago

donydchen commented 1 month ago

Hi @Shahid1Malik, can you share the error log here? It will be easier for us to see what the problem is.

Typically, when compiling and installing diff-gaussian-raterization-modified, you will need to ensure that you have correctly set up the CUDA path and G++ path.

Shahid1Malik commented 1 month ago

Building wheel for diff_gaussian_rasterization (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [105 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/diff_gaussian_rasterization copying diff_gaussian_rasterization/init.py -> build/lib.linux-x86_64-cpython-310/diff_gaussian_rasterization running build_ext

/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/utils/cpp_extension.py:414: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.8). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'diff_gaussian_rasterization._C' extension creating /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310 creating /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer Emitting ninja build file /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/5] /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/cuda_rasterizer/forward.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer/forward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 [2/5] /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/cuda_rasterizer/backward.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer/backward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 [3/5] /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/cuda_rasterizer/rasterizer_impl.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer/rasterizer_impl.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 FAILED: /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer/rasterizer_impl.o /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/cuda_rasterizer/rasterizer_impl.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/cuda_rasterizer/rasterizer_impl.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 function(_Functor&& __f)
  ^
  /usr/include/c++/11/bits/std_function.h:435:145: note:
‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 operator=(_Functor&& __f)
   ^
  /usr/include/c++/11/bits/std_function.h:530:146: note:
‘_ArgTypes’ [4/5] c++ -MMD -MF /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/ext.o.d -pthread -B /home/airlab/anaconda3/envs/mvsplat/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/airlab/anaconda3/envs/mvsplat/include -fPIC -O2 -isystem /home/airlab/anaconda3/envs/mvsplat/include -fPIC -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/ext.cpp -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/ext.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 [5/5] /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/rasterize_points.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/rasterize_points.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 FAILED: /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/rasterize_points.o /usr/bin/nvcc -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/TH -I/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/include/THC -I/home/airlab/anaconda3/envs/mvsplat/include/python3.10 -c -c /tmp/pip-req-build-eau5dyj8/rasterize_points.cu -o /tmp/pip-req-build-eau5dyj8/build/temp.linux-x86_64-cpython-310/rasterize_points.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/tmp/pip-req-build-eau5dyj8/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 function(_Functor&& __f)
  ^
  /usr/include/c++/11/bits/std_function.h:435:145: note:
‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 operator=(_Functor&& __f)
   ^
  /usr/include/c++/11/bits/std_function.h:530:146: note:

‘_ArgTypes’ ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build subprocess.run( File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/subprocess.py", line 526, 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 "/tmp/pip-req-build-eau5dyj8/setup.py", line 17, in <module>
      setup(
    File

"/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/init.py", line 104, in setup return distutils.core.setup(**attrs) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 368, in run self.run_command("build") File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run _build_ext.run(self) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run self.build_extensions() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 873, in build_extensions build_ext.build_extensions(self) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions self._build_extensions_serial() File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial self.build_extension(ext) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 252, in build_extension _build_ext.build_extension(self, ext) File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension objects = self.compiler.compile( File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 686, in unix_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects _run_ninja_build( File "/home/airlab/anaconda3/envs/mvsplat/lib/python3.10/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 diff_gaussian_rasterization Running setup.py clean for diff_gaussian_rasterization Failed to build diff_gaussian_rasterization ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (diff_gaussian_rasterization)

On Thu, Jul 25, 2024 at 9:38 PM Donald Chen @.***> wrote:

Hi @Shahid1Malik https://github.com/Shahid1Malik, can you share the error log here? It will be easier for us to see what the problem is.

Typically, when compiling and installing diff-gaussian-raterization-modified, you will need to ensure that you have correctly set up the CUDA path and G++ path.

— Reply to this email directly, view it on GitHub https://github.com/donydchen/mvsplat/issues/53#issuecomment-2251855170, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALOA2HWVQZPGN544IFN2HLLZOGZA7AVCNFSM6AAAAABLO5J6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJRHA2TKMJXGA . You are receiving this because you were mentioned.Message ID: @.***>

-- Thanking you SHAHID SHABEER MALIK

donydchen commented 1 month ago

Hi @Shahid1Malik, I have not encountered similar error logs, so I am unsure what the problem is. The CUDA version looks correct, it may be because the g++ version is too high or something, you might try to install a different g++ version. For example, run conda search gxx to find an available gxx. Then, you can install a lower version of gxx, e.g., on my machine, and I can install via conda install gxx_linux-64==11.2.0.

I don't know whether this will work. If it doesn't, you might try to find potential solutions at here, the initial repo of the Gaussian renderer.