ashawkey / torch-ngp

A pytorch CUDA extension implementation of instant-ngp (sdf and nerf), with a GUI.
MIT License
2.11k stars 275 forks source link

RuntimeError: Error compiling objects for extension while building extension #154

Open tempdeltavalue opened 1 year ago

tempdeltavalue commented 1 year ago

Windows 10, cuda 11.3 (which is works in vs), torch 1.11, torchvision 0.12.0+cu113

command:

cd raymarching python setup.py build_ext --inplace

result : ... objects = self.compiler.compile( File "C:\Users\mykha\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 714, in win_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "C:\Users\mykha\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1419, in _write_ninja_file_and_compile_objects _run_ninja_build( File "C:\Users\mykha\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1756, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension

https://github.com/facebookresearch/maskrcnn-benchmark/issues/1236

tempdeltavalue commented 1 year ago

I'm installed cuda 10.1 and torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

and I get same issue as above

but in this case is related to vs , probably Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\yvals_core.h(565): fatal error C1189: #error: STL1002: Unexpected compiler version, expected CUDA 10.1 Update 2 or newer.

also same for torch 1.12.1+cu113

ZhouHaonanShens commented 1 year ago

I met the same issue. Have you solved it?

tempdeltavalue commented 1 year ago

@ZhouHaonanShens

I didn't solve it, I just find other example of ngp on PyTorch 🙂

ZhouHaonanShens commented 1 year ago

@ZhouHaonanShens

I didn't solve it, I just find other example of ngp on PyTorch 🙂

Wow, That's great. Could you please share the link?

tempdeltavalue commented 1 year ago

@ZhouHaonanShens

Of course, everything related to your goals and time restrictions in current context, but if you want to understand the concept probably something like that will be useful: https://colab.research.google.com/drive/1rO8xo0TemN67d4mTpakrKrLp03b9bgCX

other example https://github.com/cheind/pure-torch-ngp

these ones are highlighted in the project's description https://github.com/yashbhalgat/HashNeRF-pytorch https://github.com/kwea123/ngp_pl

But in general you can type "torch ngp" in google and find something 🤷‍♂️

But I'm curious, what do you want to achieve with NGP? Why do you need that?

ZhouHaonanShens commented 1 year ago

@ZhouHaonanShens

Of course, everything related to your goals and time restrictions in current context, but if you want to understand the concept probably something like that will be useful: https://colab.research.google.com/drive/1rO8xo0TemN67d4mTpakrKrLp03b9bgCX

other example https://github.com/cheind/pure-torch-ngp

these ones are highlighted in the project's description https://github.com/yashbhalgat/HashNeRF-pytorch https://github.com/kwea123/ngp_pl

But in general you can type "torch ngp" in google and find something 🤷‍♂️

But I'm curious, what do you want to achieve with NGP? Why do you need that?

Thanks a lot for your information. That could be quite helpful for me. And I believe may be for some following persons who meet the issue.

For personal questions, I think it would be better in a private channel 🙂

Please email me at zhouhaonan1997@gmail.com if you are really curious haha.