JuliaDiff / JuliaDiff/DifferentiationInterface.jl
macro for importing rule from chain rules for all backends that support it and are loaded
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 313
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
A few backends provide support for rules from chainrules:
- Zygote: does it automatically
- ForwarDiff: CR support through https://github.com/ThummeTo/ForwardDiffChainRules.jl
- ReverseDiff: https://juliadiff.org/ReverseDiff.jl/dev/api/#ReverseDiff.@grad_from_chainrules
- Enzyme: https://enzymead.github.io/Enzyme.jl/dev/api/#Enzyme.@import_rrule-Tuple
- Mooncake: https://chalk-lab.github.io/Mooncake.jl/stable/developer_documentation/internal_docstrings/#Mooncake.@from_chainrules
DI could provide a macro that does the same for all loaded backend that support CR
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the listed backend entry points: ReverseDiff.@grad_from_chainrules, Enzyme.@import_rrule-Tuple, and Mooncake.@from_chainrules, along with ForwardDiffChainRules.jl and Zygote's automatic support. Trace how DifferentiationInterface discovers loaded backends and define what the macro should do for each supported backend, including behavior for unsupported ones. Done means one macro imports chainrules support across every loaded backend that provides it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100