JuliaDiff / JuliaDiff/DifferentiationInterface.jl
Fix ReverseDiff's `value_and_gradient!`
A pull request for this has already been merged.
- #498 by @gdalle — merged
- Dominant language
- Julia
- Stars
- 313
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
As diagnosed in #386, the function value_and_gradient!(f, grad, ::AutoReverseDiff, x) returns wrong primal outputs y = f(x) due to https://github.com/JuliaDiff/ReverseDiff.jl/issues/251. #386 fixes it, but at the cost of one extra function call. The long-term fix is something like https://github.com/JuliaDiff/ReverseDiff.jl/pull/261
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 with value_and_gradient!(f, grad, ::AutoReverseDiff, x) and read issue #386, ReverseDiff issue #251, and ReverseDiff pull request #261. Done means the function returns the correct primal output without relying on the extra function call introduced by #386.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100