Skip to content

No deriative rule found for indexed_iterate #127

@Roger-luo

Description

@Roger-luo

I think indexed_iterate should be defined either in CR or handled as intrinsic in AD engine?

MWE:

using Yota

A = Matrix(Hermitian(rand(4, 4)))

function test_f(A)
    λ, v = eigen(A)
    return sum(λ[1:1]) + sum(2.0 * v[:, 1])
end

Yota.grad(test_f, A)
julia> Yota.grad(test_f, A)
ERROR: No deriative rule found for op %13 = indexed_iterate(%4, 2, %11)::Tuple{Matrix{Float64}, Val{:done}} , try defining it using 

        ChainRulesCore.rrule(::typeof(Base.indexed_iterate), ::Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}}, ::Int64, ::Val{:vectors}) = ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions