Replies: 1 comment 1 reply
-
|
I don't think you can use Probably you'll have to define the autodiff behavior at a lower level, where the inputs and outputs are arrays rather than functions that operate on arrays. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to implement the JVP for a sparse eigenvalue solver as for example submitted in PR #32880 .
There I encounter the problem that for sparse/iterative solvers normally not a dense array is supplied but instead a function
f(x)implementing a matrix-vector. I struggle now how implement a custom JVP for example in the case where function itself would have a well-defined derivative (for example af(x) = A @ B @ xoperation) which is not constructed due to performance/memory reasons.How can I obtain a function
df(x)implementing the action of the differentialdf? Can this be formulated as a general JVP function for the sparse solver or has one to do it at a higher level where the solver is called?Beta Was this translation helpful? Give feedback.
All reactions