ubc-vision / 3dgs-mcmc

Implementation of the paper "3D Gaussian Splatting as Markov Chain Monte Carlo"
https://ubc-vision.github.io/3dgs-mcmc/
Other
239 stars 10 forks source link

Submodules/diff-gaussian-rasterization has build errors. #1

Open faster-developer opened 1 week ago

faster-developer commented 1 week ago

I can't get this submodule to build. With regular Gaussian splatting it is no problem, but I'm running into C++ compile issues. What could be the problem?

henrypearce4D commented 1 week ago

I am also getting issues. I'm running windows but with the original repo it is fine.

I had errors of missing compute_relocation so added the line in submodules\diff_gaussian_rasterization\diff_gaussian_rasterization\__init__.py

from ._C import compute_relocation

And then created submodules\diff_gaussian_rasterization\compute_relocation.cpp

#include <torch/extension.h>

// Example definition of compute_relocation
torch::Tensor compute_relocation(torch::Tensor input) {
    // Dummy implementation: just return the input tensor
    return input;
}

Then added the line in submodules\diff_gaussian_rasterization\ext.cpp

#include "compute_relocation.cpp"  // Include your compute_relocation definition

I then ran into problems with things missing because of using python 3.7.

faster-developer commented 1 week ago

Thanks, I'll try this out.

I then ran into problems with things missing because of using python 3.7.

If you're using Conda you can rebuild the project with a different Python version:

conda activate existing_env
conda install python=3.x.x
faster-developer commented 1 week ago

When compiling I still get this error:

      C:\Users\xxx\gsplat\3dgs-mcmc\submodules\diff-gaussian-rasterization\cuda_rasterizer\utils.cu(29): error: 
calling a __host__ function("double  ::sqrt<int, (int)0> (T1)") from a __global__ function("compute_relocation") is not allowed
      C:\Users\xxx\gsplat\3dgs-mcmc\submodules\diff-gaussian-rasterization\cuda_rasterizer\utils.cu(29): error: 
identifier "sqrt<int, (int)0> " is undefined in device code
shakibakh commented 4 days ago

The code has only been tested on Ubuntu 20.04. I updated the how to install section in readme with the correct package versions.