Skip to content

JuliaSmoothOptimizers/DiffKrylov.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiffKrylov

CI

DiffKrylov provides a differentiable API for Krylov.jl using ForwardDiff.jl and Enzyme.jl. This is a work in progress and eventually should enable numerical comparisons between discrete and continuous tangent and adjoint methods (see this report).

Current Technical Limitations

  • Only supports gmres, cg, and bicgstab methods
  • No support for linear operators

Current Open Questions

  • How to set the options for the tangent/adjoint solve based on the options for the forward solve? For example bicgtab may return NaN for the tangents or adjoints.

Installation

] add DiffKrylov

Usage

Using ForwardDiff.jl, we can compute the Jacobian of x with respect to b using the ForwardDiff.jl API:

using ForwardDiff, DiffKrylov, Krylov, Random
A = rand(64,64)
b = rand(64)
J = ForwardDiff.jacobian(x -> gmres(A, x)[1], b)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages