JuliaDiff / JuliaDiff/DifferentiationInterface.jl

Fix ReverseDiff's `value_and_gradient!`

Open
#387 0 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #498 by @gdalle — merged
backend
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.