Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AD crash #2208

Open
athas opened this issue Jan 16, 2025 · 0 comments
Open

AD crash #2208

athas opened this issue Jan 16, 2025 · 0 comments

Comments

@athas
Copy link
Member

athas commented Jan 16, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant