Skip to content

Enzyme v0.12.17 fails the DifferentiationInterface test suite #1562

Closed
@gdalle

Description

@gdalle

The new version v0.12.17 fails DI tests which used to pass before, as I realized in a completely unrelated PR (JuliaDiff/DifferentiationInterface.jl#327).

Something is wrong with the part of our tests related to the pullback of a scalar-to-vector function, said pullback now returns 0 instead of the correct result.

https://github.com/gdalle/DifferentiationInterface.jl/blob/4390675e46150273c60a6f493d8b48cf04e57e5b/DifferentiationInterfaceTest/src/scenarios/default.jl#L41-L49

MWE (needs the main branch of the DI repo, not the latest release):

using Pkg

Pkg.add(["ForwardDiff", "Enzyme"])

Pkg.add(
    url="https://github.com/gdalle/DifferentiationInterface.jl",
    subdir="DifferentiationInterface"
)
    
Pkg.add(
    url="https://github.com/gdalle/DifferentiationInterface.jl",
    subdir="DifferentiationInterfaceTest"
)

import ForwardDiff, Enzyme
using DifferentiationInterface, DifferentiationInterfaceTest

f = DifferentiationInterfaceTest.num_to_arr_vector
x = 1.0
dy = float.(1:6)
julia> pullback(f, AutoForwardDiff(), x, dy)
21.1651695124516

julia> pullback(f, AutoEnzyme(), x, dy)
0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions