Valentin Churavy

Results 1411 comments of Valentin Churavy

on #408 ``` julia> using Enzyme julia> f(::Val{D}) where D = prod(D) f (generic function with 1 method) julia> mwe(x, t) = x / f(Val(t)) mwe (generic function with 1...

Yeah, @wsmoses minimum improvement here is not to assert, but to report a catch-able error.

Closing this since our stance is to give a runtime error where ever possible. Please open individual issues for things that remain compile-time errors.

So this works with forward-mode, but not reverse-mode :/ The issue is that we want to zero initialize this struct which is not valid due to the symbol (at least...

Yeah but we can't pass in Duplicated. Could we call a zero function instead of doing a zero allocation?

Right my goal would be to allow the user to define what it means to allocate a zero. Maybe the other question is why ware we even accessing that field....

@wsmoses Do you still have the full MWE? https://github.com/EnzymeAD/Enzyme.jl/issues/347#issuecomment-1212435054 is not complete?

So the issue here is not that the symbol is undef, that would be fine. The issue us that the Box we use for the `sret` is undef. ``` julia>...

Digging some deeper. The issue is that we check that the validity of the sret struct with Julia `isdefined` check. This ends up in https://github.com/JuliaLang/julia/blob/b9b60fcde61ff18d77cb548421b3f71a369b4e02/src/datatype.c#L1789 where the value of the...