You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to go up to second order derivatives with Enzyme. However, when I use the same approach to go for the third derivative, I get an error. Here is a minimal working example to show that. The last function call (supposed to compute the third order derivative) gives the error.
using Enzyme
using StaticArrays
functiong(x) # Some function to be differentiated
x[1]^4+ x[1]^7+ x[2]^4+ x[1]^2* x[2]^2end# Enzyme.jl derivativesdg(x, dx) =autodiff_deferred(Forward, g, Duplicated, Duplicated(x, dx))
ddg(x, dx, ddx) =autodiff_deferred(Forward, dg, Duplicated, Duplicated(x, dx), Duplicated(dx, ddx))
dddg(x, dx, ddx, dddx) =autodiff_deferred(Forward, ddg, Duplicated, Duplicated(x, dx),
Duplicated(dx, ddx), Duplicated(ddx, dddx))
# Get random inputs for x and some directions for the directional derivatives
x =SVector{2}(rand(2)); dx =SVector{2}(rand(2)); ddx =SVector{2}(rand(2)); dddx =SVector{2}(rand(2))
# Call the functions with inputsdg(x, dx) # Worksddg(x, dx, ddx) # Worksdddg(x, dx, ddx, dddx) # Error
I am able to go up to second order derivatives with Enzyme. However, when I use the same approach to go for the third derivative, I get an error. Here is a minimal working example to show that. The last function call (supposed to compute the third order derivative) gives the error.
The error message is below.
Error message
I am using Enzyme v0.12.27.
versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 80 × Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake-avx512)
Threads: 1 default, 0 interactive, 1 GC (on 80 virtual cores)
Environment:
JULIA_EDITOR =
JULIA_NUM_THREADS = 1
The text was updated successfully, but these errors were encountered: