Skip to content

Missing basis method #944

@ameligrana

Description

@ameligrana

Tests in this PR (https://github.com/mlange-42/Ark.jl/actions/runs/20252583191/job/58147727078?pr=426) are failing using AutoMooncakeForward backend throwing this error:

Compute gradients through Mooncake.jl: Error During Test at /home/runner/work/Ark.jl/Ark.jl/test/ext/test_mooncake_interop.jl:6
  Got exception outside of a @test
  MethodError: no method matching basis(::Tuple{Float64, Float64})
  
  Closest candidates are:
    basis(::GPUArraysCore.AbstractGPUArray{T}, ::Any) where T
     @ DifferentiationInterfaceGPUArraysCoreExt ~/.julia/packages/DifferentiationInterface/4n6vR/ext/DifferentiationInterfaceGPUArraysCoreExt/DifferentiationInterfaceGPUArraysCoreExt.jl:6
    basis(::AbstractArray)
     @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/utils/basis.jl:23
    basis(::AbstractArray, ::Any)
     @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/utils/basis.jl:16
  
  Stacktrace:
    [1] _prepare_pullback_aux(::Val{true}, ::DifferentiationInterface.PullbackSlow, ::var"#run_world#360", ::AutoMooncakeForward{Nothing}, ::Tuple{Float64, Float64}, ::Tuple{Float64})
      @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/first_order/pullback.jl:291
    [2] prepare_pullback_nokwarg(::Val{true}, ::var"#run_world#360", ::AutoMooncakeForward{Nothing}, ::Tuple{Float64, Float64}, ::Tuple{Float64})
      @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/first_order/pullback.jl:259
    [3] prepare_gradient_nokwarg(::Val{true}, ::var"#run_world#360", ::AutoMooncakeForward{Nothing}, ::Tuple{Float64, Float64})
      @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/first_order/gradient.jl:93
    [4] gradient(::var"#run_world#360", ::AutoMooncakeForward{Nothing}, ::Tuple{Float64, Float64})
      @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/4n6vR/src/first_order/gradient.jl:62
    [5] macro expansion
      @ ~/work/Ark.jl/Ark.jl/test/ext/test_mooncake_interop.jl:41 [inlined]
    [6] macro expansion
      @ /opt/hostedtoolcache/julia/1.10.10/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
    [7] top-level scope
      @ ~/work/Ark.jl/Ark.jl/test/ext/test_mooncake_interop.jl:7
    [8] include(fname::String)
      @ Base.MainInclude ./client.jl:494
    [9] top-level scope
      @ ~/work/Ark.jl/Ark.jl/test/ext/runtests.jl:5
   [10] include(fname::String)
      @ Base.MainInclude ./client.jl:494
   [11] top-level scope
      @ ~/work/Ark.jl/Ark.jl/test/runtests.jl:45
   [12] include(fname::String)
      @ Base.MainInclude ./client.jl:494
   [13] top-level scope
      @ none:6
   [14] eval
      @ ./boot.jl:385 [inlined]
   [15] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:296
   [16] _start()
      @ Base ./client.jl:557

seems like the method at https://github.com/JuliaDiff/DifferentiationInterface.jl/blob/main/DifferentiationInterface/src/first_order/pullback.jl#L291 is missing

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