I am trying to find the derivative of a function (that has input as the converged values of Jacobi iterator), with respect to the elements of the matrices used in Jacobi iterations. For example, if * f(x)* is a function of

*x*, which in turn comes from

**A**

*x*=

**b**, I am trying to find the derivative of

**f**with respect to element of

**A**and

**b**.

I am using **reverseDiff.jl** and **forwardDiff.jl** for this purpose, but all I can get is derivative of **f** with respect to the converged *x*, even when I pass **b** as parameter in the **GradientConfig** and **GradientTape** functions.

I have done this in C++ using CoDiPack library, but no success in Julia. Is this even possible in Julia? Any help would be appreciated. Thanks.