Valentin Churavy
Valentin Churavy
Ok some bread-crumbs ``` Thread 1 received signal SIGSEGV, Segmentation fault. 0x00007f8a22c977d0 in jl_is_type (v=0x0) at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/julia.h:1255 1255 /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/julia.h: No such file or directory. (rr) up #1 jl_f_issubtype (F=, args=0x7ffe851c1df0,...
@wsmoses Can you take a look? ``` vchuravy@odin ~/s/Enzyme (vc/anonymous)> ~/builds/julia-dbg/julia --project=. test.jl dx = [3.0, 2.0] julia: /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/local/include/llvm/ADT/DenseMap.h:1250: bool llvm::operator==(const llvm::DenseMapIterator&, const llvm::DenseMapIterator&): Assertion `(!LHS.Ptr || LHS.isHandleInSync()) && "handle...
We will have to add a `structural sparse zero` function Maybe ``` function dsparse(sp) dsp = similar(sp) fill!(nonzeros(sp), zero(eltype(dsp))) return dsp end ``` cc: @Wimmerer
As far as I can tell duplicate of #347
So this is interesting. We basically have a custom floating point type, so teaching Enzyme about that is going to be fun. Probably best to wait for #177
I am a bit wary of depending on ChainRules immediately since most of the rules are written using a closure passing/capture style. And I am not sure that we can...
``` module EnzymeRules """ augmented_primal(::typeof(f), args...) Return the primal computation value and a tape """ function augmented_primal end """ Takes gradient of derivative, activity annotation, and tape """ function reverse...
On main I get a slightly better answer: ``` julia> Enzyme.autodiff(mwe, Active, Active(1.0), Const((1, 2))) ERROR: MethodError: no method matching typeof(mwe)(::Float64, ::Tuple{Int64, Int64}) Stacktrace: [1] macro expansion @ ~/.julia/packages/GPUCompiler/1FdJy/src/cache.jl:0 [inlined]...
So a `Active` return doesn't like Any ``` julia> using Enzyme julia> f(x) = Base.inferencebarrier(x) f (generic function with 1 method) julia> Enzyme.autodiff(f, Active, Active(1.0)) ERROR: MethodError: no method matching...
But even with: ``` julia> f(::Val{D}) where D = prod(D) julia> @code_typed mwe(1.0, (1, 2)) CodeInfo( 1 ─ %1 = Main.Float64::Type{Float64} │ %2 = invoke Main.Val(t::Tuple{Int64, Int64})::Val │ %3 =...