Lakonik / SSDNeRF

[ICCV 2023] Single-Stage Diffusion NeRF
https://lakonik.github.io/ssdnerf/
MIT License
437 stars 23 forks source link

CUDA 12 #34

Open rfeinman opened 10 months ago

rfeinman commented 10 months ago

Thank you for the awesome library!

I am wondering: is it possible to use your CUDA extensions (e.g. raymarching and shencoder) with CUDA 12? I have been using your extensions in my project and I am trying to accelerate my compute with CUDA 12. I'm wondering if you have any advice or suggestions. Are there any extra flags/args that need to be included in setup.py? Would this just work out of the box?

Lakonik commented 10 months ago

HI! I think it should work out of the box for CUDA 12. You can report the error message here if there's any problem.

rfeinman commented 10 months ago

I get the following error when installing raymarching (shortened for brevity):

...

Building wheels for collected packages: raymarching
  Building wheel for raymarching (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [818 lines of output]
      running bdist_wheel
      running build
      running build_ext
      /data/anaconda/envs/pt2/lib/python3.9/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no g++ version bounds defined for CUDA version 12.1
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building '_raymarching' extension

...

/data/anaconda/envs/pt2/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~

When I look at your setup.py I see that you are specifying C++14, but in the pytorch build-from-source instructions, they suggest C++17. What's the reason for the discrepancy? Could this be the problem?

Lakonik commented 10 months ago

Yep. I think replacing c++14 with c++17 should fix this.