nerfstudio-project / gsplat

CUDA accelerated rasterization of gaussian splatting
https://docs.gsplat.studio/
Apache License 2.0
1.33k stars 150 forks source link

Error: namespace "cooperative_groups" has no member "labeled_partition", when build gsplat from source #226

Closed JuliusQv closed 4 weeks ago

JuliusQv commented 1 month ago

I clone the newest gsplat code, and try to install it by: pip install -e .

But i meet the following error:

gsplat/cuda/csrc/projection.cu(485): error: namespace "cooperative_groups" has no member "labeled_partition"
auto warp_group_g = cg::labeled_partition(warp, gid);
                         ^

gsplat/cuda/csrc/projection.cu(510): error: namespace "cooperative_groups" has no member "labeled_partition"
          auto warp_group_c = cg::labeled_partition(warp, cid);
                                  ^

gsplat/cuda/csrc/projection.cu(825): error: namespace "cooperative_groups" has no member "labeled_partition"
      auto warp_group_g = cg::labeled_partition(warp, gid);
                              ^

gsplat/cuda/csrc/projection.cu(869): error: namespace "cooperative_groups" has no member "labeled_partition"
          auto warp_group_c = cg::labeled_partition(warp, cid);
                                  ^

gsplat/cuda/csrc/projection.cu(1423): error: namespace "cooperative_groups" has no member "labeled_partition"
          auto warp_group_g = cg::labeled_partition(warp, gid);
                                  ^

gsplat/cuda/csrc/projection.cu(1469): error: namespace "cooperative_groups" has no member "labeled_partition"
          auto warp_group_c = cg::labeled_partition(warp, cid);

It seams the namespace cooperative_groups did not implement the function labeled_partition.

How can i solve this problem?

liruilong940607 commented 1 month ago

Hi! gsplat requires a modern GPU that has compute capability >= 7.0.

You can check your GPU's compute capability at here

realimposter commented 4 weeks ago

Im seeing the same error using a 3090 with compute capability 8.6

311.2 gsplat/cuda/csrc/projection.cu(1469): error: namespace "cooperative_groups" has no member "labeled_partition" 311.2 311.2 6 errors detected in the compilation of "gsplat/cuda/csrc/projection.cu". 311.2 error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1 311.2 [end of output] 311.2 311.2 note: This error originates from a subprocess, and is likely not a problem with pip. 311.2 ERROR: Failed building wheel for gsplat 311.2 Running setup.py clean for gsplat 312.9 Failed to build gsplat 312.9 ERROR: Could not build wheels for gsplat, which is required to install pyproject.toml-based projects

liruilong940607 commented 4 weeks ago

@realimposter Sorry I think also CUDA>=11.0 is required. labeled_partition is a new feature introduced in CUDA 11: https://www.cs.nthu.edu.tw/~ychung/slides/CSC4005/CUDA_C_Programming_Guide.pdf

realimposter commented 4 weeks ago

ahh ok thanks I added ENV TORCH_CUDA_ARCH_LIST="8.0;8.6", and it works now

JerryDeepl commented 2 weeks ago

Hi! gsplat requires a modern GPU that has compute capability >= 7.0.

You can check your GPU's compute capability at here

My GPU has compute capability == 6.1 and CUDA==11.8, so gsplat==1.0.0 and nerfstudio==1.1.3 do not work anymore? Thanks for your reply!

liruilong940607 commented 2 weeks ago

@JerryDeepl Unfortunately yes.

JerryDeepl commented 2 weeks ago

@JerryDeepl Unfortunately yes.

What are the differences between the gsplat 1.0.0 version and the 0.1.12 version in nerfstudio? If the code for gsplat 1.0.0 in nerfstudio is implemented with 0.1.12, can the same training results be achieved? Thanks for your reply!

liruilong940607 commented 2 weeks ago

1.0.0 improves the speed and memory usage by a large margin. It also fixes the gradients w.r.t cameras. There are also a long list of more features supported in 1.0.0. But if you are not optimizing camera and are not sensitive to runtime/GPU usage. You should be able to get the same training results.

JerryDeepl commented 2 weeks ago

1.0.0 improves the speed and memory usage by a large margin. It also fixes the gradients w.r.t cameras. There are also a long list of more features supported in 1.0.0. But if you are not optimizing camera and are not sensitive to runtime/GPU usage. You should be able to get the same training results.

Got it, thanks a lot

chenin-wang commented 1 week ago
  1. Edit your shell configuration file: Open your shell configuration file using a text editor. Commonly used shell configuration files include:

    • vi ~/.bashrc (for Bash shell)
  2. Add the environment variable: At the end of the file, add the following line:

    export TORCH_CUDA_ARCH_LIST="8.6"

    Replace "8.0;8.6" with the desired CUDA architecture list for your GPU. gpu

  3. Save and close the file.

  4. Activate the changes: Run the following command to activate the new environment variable:

    source ~/.bashrc  

    https://github.com/nerfstudio-project/nerfstudio/issues/2727#issue-2066103535