Open visva89 opened 1 year ago
That's a bug of some sort.
In an expression like @reduce a[i] := sum(j) b[i,j]
, and in one like @cast c[i] := d[i] (i in 1:3)
, the macro gets two expressions. It is, apparently, using the absence of any indexing in the second to distinguish them. Which goes wrong in your example. It should infer this some other way, and leave 1:bsz[1]
alone.
(The error is slightly confusing, it talks about "how do I reduce over..." and comes from reduceparse
. This is because @cast
accepts things that like @cast _[i,j] := softmax(j) m[i,j]
, the syntax of @reduce
without dropping dims.)
Here is a short example (Julia 1.9.2)
Is it expected behavior? Just learning Julia, couldn't find why this doesn't work in docs or other issues.