William Moses

Results 889 comments of William Moses

https://github.com/wsmoses/Enzyme/pull/438 This should start to enable julia errors rather than having to use llvm unreachable/assertions.

@ChrisRackauckas once https://github.com/wsmoses/Enzyme.jl/pull/193 lands (with corresponding jll bump) the BLAS (and other errors) should come through as proper julia errors, rather than LLVM assertions.

With strict aliasing set to the default, this fails since the return array of the collect is used as both an integer and a float, which type analysis deduces illegal....

@vchuravy that is indeed the cause. Specifically, what happens from looking at the IR (below) is as follows: ``` res = { 0.0, null } res[1] += 2 * f.x...

I'm not sure that would be a good resolution. Unless we tell the compiler to preserve a lot more info, this is just an arbitrary register that's getting its allocated...

You can always wrap something in a ref as a shim, allowing it to be duplicated.

Reason is that we return it as part of the register. It must have _some_ value. But more specifically, we always zero-initialize all shadow memory, so that's why that field...

@vchuravy the PR makes this now into a segfault: ``` julia> # 2. My function let grad_storage = similar(params0) Enzyme.gradient!(Enzyme.Reverse, grad_storage, objective, params0) @show grad_storage end signal (11): Segmentation fault...

https://github.com/EnzymeAD/Enzyme.jl/pull/408