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
The following code crashes when calling forward_over_reverse(...). The code and the Manifest.toml is at https://github.com/exanauts/EnzymeDiff.jl. Let me know what I should throw out further.
using Enzyme
using LinearAlgebra
Enzyme.API.printall!(true)
Enzyme.API.printtype!(true)
n =2functionspeelpenning(y, x)
y .= x .* x
returnnothingendfunctionreverse(y::VT, x::VT) where {VT}
FT =eltype(x)
rx =convert(VT, zeros(FT,n))
ry =convert(VT, ones(FT,n))
_x =Duplicated(x, rx)
_y =Duplicated(y, ry)
autodiff(speelpenning, _y, _x)
return rx
endfunctionforward_over_reverse(y::VT, x::VT) where {VT}
FT =eltype(x)
dx =convert(VT, ones(FT,n)); rx =convert(VT, zeros(FT,n)); drx =convert(VT, zeros(FT,n))
dy =convert(VT, zeros(FT,n)); ry =convert(VT, ones(FT,n)); dry =convert(VT, zeros(FT,n))
functionfoo(y, x)
autodiff_deferred(speelpenning, Const, y, x)
returnnothingend
_x =Duplicated(Duplicated(x,rx), Duplicated(dx,drx))
_y =Duplicated(Duplicated(y,ry), Duplicated(dy,dry))
fwddiff(foo, _y, _x)
return rx, drx
end
x = [i/(1.0+i) for i in1:n]
y =zeros(n)
speelpenning(y,x)
g =reverse(y, x)
# Crashes
g1, g2 =forward_over_reverse(y,x)
# This test should pass@showall(g .== g1)
Output: log.tar.gz
Julia version and dependencies:
Julia Version 1.8.0-beta3
Commit 3e092a2521 (2022-03-29 15:42 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 144 × Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake-avx512)
Threads: 1 on 144 virtual cores
(EnzymeDiff.jl) pkg> st
Status `/scratch/mschanen/git/EnzymeDiff.jl/Project.toml`
[7da242da] Enzyme v0.10.0-dev `/scratch/mschanen/julia_depot/dev/Enzyme`
The text was updated successfully, but these errors were encountered:
The following code crashes when calling
forward_over_reverse(...)
. The code and theManifest.toml
is at https://github.com/exanauts/EnzymeDiff.jl. Let me know what I should throw out further.Output:
log.tar.gz
Julia version and dependencies:
The text was updated successfully, but these errors were encountered: