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

Add user-interface for generating pushforward functions #825

Open
parth-07 opened this issue Mar 16, 2024 · 1 comment
Open

Add user-interface for generating pushforward functions #825

parth-07 opened this issue Mar 16, 2024 · 1 comment

Comments

@parth-07
Copy link
Collaborator

Clad internally generates pushforward functions for differentiating function calls in forward mode AD. However, clad::differentiate, the user-interface for forward mode AD, generates a more restricted form of pushforward function which does not allow users to tweak the seed values. While pushforward functions are more difficult to use, they offer more control over the forward mode AD and allow to compute directional derivatives. Higher-order pushforward functions can even be used to compute partial derivatives such as d2y/dx1dx2 where y is the output parameter and x1 and x2 are distinct input parameters.

We should keep clad::differentiate as it is because it is easier to use and add a new function such as clad::pushforward that allows users to request generation of pushforward functions.

@gojakuch
Copy link
Collaborator

btw, I had a similar idea in the context of #1023. this isn't the same, but it's kind of related and could potentially be an alternative solution to that issue if #1038 never gets merged (to some extent of course, since this still requires user to do some extra requests)

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

No branches or pull requests

2 participants