JuliaMath / JuliaMath/AbstractFFTs.jl

Adding EnzymeRules

Open
#99 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
134
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Similar to the ChainRulesCore support, we could use `EnzymeCore.EnzymeRules` to define `Forward` and `Reverse` mode rules for Enzyme in an extension.

EnzymeCore requires at least Julia v1.6. Making it a dependency for Julia versions older than v1.6 (as is done with ChainRulesCore) would then only be possible if AbstractFFTs add a Julia v1.6 version bound. But since EnzymeCore's sole dependency (Adapt) depends on Requires, it may make more sense to conditionally load on pre-v1.9 using Requires.jl: https://pkgdocs.julialang.org/dev/creating-packages/#Requires.jl

Unlike ChainRulesCore support, it probably only makes sense to only define rules for `StridedArray` inputs to avoid doing the wrong thing for sparse or structured arrays.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.