futhark icon indicating copy to clipboard operation
futhark copied to clipboard

Invalid instantiation of explicit size passing

Open athas opened this issue 9 months ago • 0 comments

-- ==
-- input { 1i64 2i64 } output { [0.0,0.0] }

def f (n: i64) (m: i64) (g: f64 -> [m ** n]f64) = g 0

entry main n m = f n m (\x -> replicate (m ** n) x)

This goes wrong when the monomorphiser tries to insert a concrete argument to represent the m**n size, which instead becomes a constant zero.

athas avatar Mar 11 '25 09:03 athas