-
Notifications
You must be signed in to change notification settings - Fork 113
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
Full hessian (c++) #2174
Comments
Is your Hessian sparse or dense? If dense, the Hessian can be computed efficiently using the HVP (ideally combined with batching). If sparse and you know the sparsity pattern, you can compute a coloring and efficiently obtain an assembled sparse Hessian using the HVP (some libraries, such as PETSc, will automate this for you). If you want Enzyme to figure out the sparsity pattern and put the matrix in a CSR format, I think that would be a new feature (don't know if Enzyme maintainers would consider it "patches welcome" or out of scope). |
The hessian and jacobian are sparse. I do not know the sparsity pattern and need to obtain this from the library. CSR is ideal for both jacobian and hessian. I do not know the HvP nor does the library I'm coupling to require it. I had naively assumed that on computing derivatives for the jacobian and hessian the library knows it's a zero entry and the sparsity would "come for free"? |
there is some work in Enzyme to automatically automate the sparsity detection x/ref https://c.wsmoses.com/presentations/weuroad23.pdf cc @martinjm97 @kmu @shoaibkamil |
though that said patches/features generally always welcome (but if it's a more significant thing, probably worth a github discussion, or discussion at the weekly enzyme meeting |
Thank you. Can you confirm at present dense (without sparsity calcs) hessian computations are possible? Is there an example of that? |
Hi, just following this up. Could you confirm pure hessian computations are possible, dense or otherwise? Could you provide an example? Thanks |
I'd like to consider this library to support my interaction with ipopt. For that to work I need the gradient, Jacobian, and hessian of functions with respect to the optimisation variable or variables. To that end I also need to provide to ipopt sparsity patterns for the jacobian and hessian. I need the hessian, not the HVP etc. My code is c++ and interfaces to ipopt using c++.
Taking all of the above into account would I be able to use enzyme now? If not, what is missing?
Thanks
The text was updated successfully, but these errors were encountered: