diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.41k stars 166 forks source link

Another defunctionalisation crash #2184

Closed athas closed 1 month ago

athas commented 1 month ago
entry calculate_objective [d]
                          (xParam: [3][4*d]f64)
                          (yParam: [3][d]f64) : f64 =
  0

entry calculate_jacobian [d]
                          (mainParams: [3][4*d]f64)
                          (yParam: [3][d]f64) =
  vjp (\(x, y) -> calculate_objective x y) (mainParams, yParam) 1

Looks related to the use of complicated size expressions.

athas commented 1 month ago

The culprit here is actually in monomorphisation and is related to the fact that we treat entry points specially wrt. sizes.