NVIDIA / warp

A Python framework for high performance GPU simulation and graphics
https://nvidia.github.io/warp/
Other
4.28k stars 243 forks source link

Question on tape #125

Open jc211 opened 1 year ago

jc211 commented 1 year ago

"Warp uses a source-code transformation approach to auto-differentiation."

I don't quite understand what this means and I know this is not how one is supposed to use tape but my question is: Is it technically possible for me to write a @wp.func foo and get back a @wp.func foo_derivative which I can save and reuse later within kernel launches? This is in contrast to doing it at the kernel level.

mmacklin commented 1 year ago

Hi @jc211,

Currently we don't provide a way to call the derivative directly - however this would not be too difficult and I can imagine could be quite useful. I will make a note of this feature request.

Thanks, Miles