Xharlie / pointnerf

Point-NeRF: Point-based Neural Radiance Fields
Other
1.1k stars 128 forks source link

Replace pycuda with torch extensions #82

Open nexuslrf opened 1 year ago

nexuslrf commented 1 year ago

Hi,

I made a fork of this repo (https://github.com/nexuslrf/pointnerf/tree/master/models/neural_points/c_ext) and replaced all pycuda modules with torch extension, the CUDA kernels are almost the same as before. I verified the modifications by running w_n360/lego.sh & dtu_test_inf/inftest_scan1.sh.

For those who are still struggling with pycuda, you can give it try.

I am willing to create a pull request for this, but it might need more verifications from the community.

RuixiangXue commented 1 year ago

Hi @nexuslrf , I also meet the same question about pycuda, but I have no idea about how to try your thought. Can u share your code about this file?

nexuslrf commented 1 year ago

Hi @RuixiangXue , you can replace/add all the changed files in this commit: https://github.com/Xharlie/pointnerf/compare/master...nexuslrf:pointnerf:master

After that, run the cmd shown in https://github.com/nexuslrf/pointnerf/blob/master/models/neural_points/c_ext/README.md

Xharlie commented 1 year ago

hi, we have updated the pytorch cuda extension 5 months ago, is your extension similar?

CTouch commented 11 months ago

goooooood job!

xiaoc57 commented 11 months ago

If you have any doubts, you can replace the orgin models folder directly. This work is helpful for me.

lhp121 commented 2 days ago

After running the command python setup.py build_ext --inplace, can you directly run or test the code, such as bash dev_scripts/w_n360/lego_test.sh?@nexuslrf