Skip to content

AutoGTPSA not exported and not working #831

@mattsignorelli

Description

@mattsignorelli

The GTPSA backend appears to not be exported by DifferentiationInterface, and also does not work when I explicitly do import ADTypes.AutoGTPSA:

julia> using DifferentiationInterface, GTPSA

julia> x = collect(1.0:5.0);

julia> f(x) = sum(abs2, x);

julia> gradient(f, AutoGTPSA(), x)
ERROR: UndefVarError: `AutoGTPSA` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name may be made accessible by importing ADTypes in the current active module Main
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

julia> import ADTypes.AutoGTPSA

julia> gradient(f, AutoGTPSA(), x)
ERROR: MissingBackendError: Failed to use AutoGTPSA().
Backend package is probably not loaded. To fix this, try to run

    import GTPSA

Stacktrace:
 [1] _prepare_pushforward_aux(::DifferentiationInterface.PushforwardFast, ::Function, ::AutoGTPSA{…}, ::Vector{…}, ::Tuple{…})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/first_order/pushforward.jl:139
 [2] prepare_pushforward(::typeof(f), ::AutoGTPSA{Nothing}, ::Vector{Float64}, ::Tuple{Vector{Float64}})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/first_order/pushforward.jl:95
 [3] _prepare_pullback_aux(::DifferentiationInterface.PullbackSlow, ::typeof(f), ::AutoGTPSA{Nothing}, ::Vector{Float64}, ::Tuple{Bool})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/first_order/pullback.jl:117
 [4] prepare_pullback(::typeof(f), ::AutoGTPSA{Nothing}, ::Vector{Float64}, ::Tuple{Bool})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/first_order/pullback.jl:95
 [5] prepare_gradient(::typeof(f), ::AutoGTPSA{Nothing}, ::Vector{Float64})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/first_order/gradient.jl:58
 [6] gradient(::typeof(f), ::AutoGTPSA{Nothing}, ::Vector{Float64})
   @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/yXBFa/src/fallbacks/no_prep.jl:11
 [7] top-level scope
   @ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendRelated to one or more autodiff backends

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions