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

Threaded Jacobians and Hessians #50

Open
alanderos91 opened this issue Sep 24, 2021 · 1 comment
Open

Threaded Jacobians and Hessians #50

alanderos91 opened this issue Sep 24, 2021 · 1 comment

Comments

@alanderos91
Copy link
Contributor

Hello! I am interested in using Polyster.jl to evaluate Jacobians and Hessians in parallel, similar to threaded_gradient! over here using the ForwardDiff API.
A parallel Jacobian is a higher priority for myself and my collaborators.

We'd be happy to contribute a PR to implement this but I'm unsure of exactly what needs to be done and what tests ought to be included.

@chriselrod
Copy link
Member

Hello! I am interested in using Polyster.jl to evaluate Jacobians and Hessians in parallel, similar to threaded_gradient! over here using the ForwardDiff API.
A parallel Jacobian is a higher priority for myself and my collaborators.

We'd be happy to contribute a PR to implement this but I'm unsure of exactly what needs to be done and what tests ought to be included.

Hi, that'd be great.
Once you've implemented a threaded Jacobian function, the threaded hessian should be trivial (i.e., take the threaded Jacobian of a [non-threaded] gradient).
The threaded gradient code was based on the chunk mode gradient code in ForwardDiff.jl.
The basic idea is to break up the gradient vector among threads, and then have the threads evaluate code for their local chunks.

So I'd recommend the same basic approach. You can use the chunk mode jacobian code as a reference.
Basically, divide the input vector up among threads (i.e. you're splitting up the inputs by which ones become dual numbers), and then have each thread iterate over their local chunks.

I would also like the Jabobian function to also store the vector output/make it available in case anyone using it needs it, to save them from needing to reevaluate the function.

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

2 participants