krrish94 / nerf-pytorch

A PyTorch re-implementation of Neural Radiance Fields
Other
884 stars 121 forks source link

torchsearchsorted on CUDA #18

Open ai1361720220000 opened 3 years ago

ai1361720220000 commented 3 years ago

hello, i have installed torchsearchsorted1.1, but when the code comes to error when running inds = torchsearchsorted.searchsorted(cdf, u, side="right")

Exception: torchsearchsorted on CUDA device is asked, but it seems that it is not available. Please install it.

krrish94 commented 3 years ago

Pytorch 1.6 now includes a torchsearchsorted module (which also works on the CPU)

I'd recommend trying that out instead :)

ai1361720220000 commented 3 years ago

thank you~ i will try it.

Ilya-Muromets commented 3 years ago

https://pytorch.org/docs/stable/generated/torch.searchsorted.html

Any reason to hold on to the external searchsorted dependency? Might be easier to swap in the official and require pytorch>=1.6

krrish94 commented 3 years ago

@Ilya-Muromets no reason at all :)

Just that I haven't been able to get back to working on this repo since I published it

krrish94 commented 3 years ago

Should be an easy PR if anyone's willing to volunteer

Ilya-Muromets commented 3 years ago

Made a PR, was just a 2 line change. Didn't test numerical equivalence, but training 'looks fine'.

Lego example: image

Jia-Wei-Liu commented 2 years ago

Hi, Thanks for sharing your code. I install the pytorch 1.60 but still have the same problem: Exception: torchsearchsorted on CUDA device is asked, but it seems that it is not available. Please install it. When I try to install torchsearchsorted, it shows Requirement already satisfied. Can anyone help me? Thank you very much! Best regards!