Closed matinraayai closed 11 months ago
I think this PR (https://github.com/EnzymeAD/Enzyme.jl/pull/1155) may fix it. Going to tentatively close this, reopen it if not?
@wsmoses I moved away from using the Cfg Dict and an explicit Union{T, Nothing}
struct, since Enzyme didn't like them for now. I'll get back to this after I have a basic code without a cfg structure working.
Since moving away my code doesn't throw this error anymore. It has other issues, which is better to discuss over other issues.
Thanks @wsmoses!
@wsmoses Following #1152 's fix, I now get the following error when I try to differentiate the following code:
This is the new error I get:
The repository in question is here with its submodules. The file in question is here. It can be run with
julia --project example/redbird_enzyme.jl
from the top level folder.The variables that I'm interested in are
prop
anddetval
. Every other input should remain a constant (even though I've duplicated them here).Note you need a working Matlab installation to generate the
cfg
to pass to the code. If not, maybe Octave.jl can be a drop-in replacement to run this code. The differentiable code doesn't perform calls to Matlab and it (should) be in pure Julia.The LLVM IR dumped by Enzyme.jl can be found here.