Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second order derivative? #52

Open
radenmuaz opened this issue Jul 31, 2022 · 2 comments
Open

Second order derivative? #52

radenmuaz opened this issue Jul 31, 2022 · 2 comments

Comments

@radenmuaz
Copy link

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 ?

@ziyi-zhang
Copy link
Contributor

Dear @radenmuaz,

An official reply wouldn't be available until mid August since most of the team is off for vacation and Siggraph (mitsuba-renderer/mitsuba3#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

@Speierers
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants