Skip to content

seed! zero-seed methods removed in ForwardDiff v1.4.4, breaks threaded_gradient!/threaded_jacobian! #35

Description

@dr-ko

ForwardDiff v1.4.4 dropped the zero-seed seed! methods (seed!(duals, x), seed!(duals, x, index)) in favor of seed_zero_partials!. PolyesterForwardDiff still calls the old forms in evaluate_chunks!, evaluate_jacobian_chunks!, and evaluate_f_and_jacobian_chunks!.

using PolyesterForwardDiff
using ForwardDiff
using Random

Random.seed!(20260805)

f(x) = sum(sin.(x) .+ x.^2)
x = rand(1000)
dx = similar(x)
chunk = ForwardDiff.Chunk(8)

PolyesterForwardDiff.threaded_gradient!(f, dx, x, chunk)
ERROR: MethodError: no method matching seed!(::StrideArraysCore.StrideArray{ForwardDiff.Dual{Nothing, Float64, 8}, ...}, ::StrideArraysCore.PtrArray{Float64, ...})
Closest candidates are:
  seed!(::AbstractArray{ForwardDiff.Dual{T, V, N}}, ::Any, !Matched::NTuple{N, ForwardDiff.Partials{N, V}}) where {T, V, N}
   @ ForwardDiff ~/.julia/packages/ForwardDiff/IleGP/src/apiutils.jl:107

Versions: Julia 1.12.6, ForwardDiff 1.4.4, Polyester 0.7.19, PolyesterForwardDiff 0.1.3

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