Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA 12 #34

Open
rfeinman opened this issue Dec 22, 2023 · 3 comments
Open

CUDA 12 #34

rfeinman opened this issue Dec 22, 2023 · 3 comments

Comments

@rfeinman
Copy link

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
Copy link
Owner

Lakonik commented Dec 24, 2023

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
Copy link
Author

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
Copy link
Owner

Lakonik commented Dec 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants