EnzymeAD / EnzymeAD/Reactant.jl
`Enzyme.ReverseSplitWithPrimal` is not supported
Open
- Dominant language
- Julia
- Stars
- 370
- Forks
- 74
- Avg merge
- 18h 47m
- Merged PRs (30d)
- 30
Description
```julia
using Enzyme, Reactant
f(x) = sum(abs2, x .* x)
function enzyme_split_mode(x)
dx = Enzyme.make_zero(x)
forward, reverse = autodiff_thunk(
ReverseSplitWithPrimal, Const{typeof(f)}, Active, Duplicated{typeof(x)}
)
tape, result, shadow_result = forward(Const(f), Duplicated(x, dx))
reverse(Const(f), Duplicated(x, dx), 1.0, tape)
return result, dx
end
x = rand(10)
f(x)
enzyme_split_mode(x)
x_ra = Reactant.to_rarray(x)
@code_hlo optimize = true enzyme_split_mode(x_ra)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.