drjit
drjit copied to clipboard
Second order derivative?
Is it possible to do backward_to of a Float variable to itself? Is there a standard way to do something like jax's .hessian, .jacrev, .jacfwd ?
Dear @radenmuaz,
An official reply wouldn't be available until mid August since most of the team is off for vacation and Siggraph (https://github.com/mitsuba-renderer/mitsuba3/discussions/123).
AFAIK, we do not have any second order support. We cannot differentiate the AD graph itself either (in other words, dr.grad(vec)
is a fully detached vector). I am uncertain if this will be added to the TODO list later.
The last time I needed a second derivative, I did that part of the computation in another framework and copied the result back.
Best
Is it possible to do backward_to of a Float variable to itself?
In DrJIT this will result in a no-op. Although I am not really sure to understand what you are expecting from it. Could you maybe provide a snippet example to illustrate what you mean?
Other than that, as mentioned above, second order derivates aren't supported in Dr.JIT.