sniklaus / softmax-splatting

an implementation of softmax splatting for differentiable forward warping using PyTorch
468 stars 58 forks source link

Generate random number in cuda kernel #58

Closed JuewenPeng closed 1 year ago

JuewenPeng commented 1 year ago

Really nice work.

I want to ask a technical problem. Is it possible to generate random number in cuda kernel. If you could give me some suggestions, I would really appreciate that.

Looking forward to your reply.

sniklaus commented 1 year ago

I am under the impression that generating a random number inside of a CUDA kernel isn't as straightforward as one may think. I would recommend you generate the random numbers in PyTorch and then pass the tensor to the CUDA kernel as an additional input.

JuewenPeng commented 1 year ago

Thank you very much