Skip to content

AD crash #2208

@athas

Description

@athas

This produces invalid code after AD:

entry scan_arr_add [n]
                   (inp: [2][n]f32)
                   (adj: [2][n]f32) : [2][n]f32 =
  let adj =
    vjp (scan (\x y -> [x[0] + y[0], x[1] + y[1]])
              (replicate 2 0))
        (transpose inp)
        (transpose adj)
  in transpose adj

The problem is that some part of the differentiation rule assumes that the operands are never arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    adRelated to automatic differentiationbugcompiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions