You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my example the issue could easily be resolved by performing the abs2 directly on the vals array returned by the @tullio macro.
I briefly discussed this with @mcabbott on slack and this appears to only happen when threading is enabled in @tullio.
The text was updated successfully, but these errors were encountered:
One possibility would be that, when the macro sees a finaliser (such as abs2), it always removes the reduction indices from consideration by the tiling code. This would allow threading on other indices, and should be safe.
Another would be that, during the setup, it could test that the type of the intermediate reduction matches the final type, and throw an error. (If threading is enabled.) This would at least avoid the confusing situation where the above case works for small arrays, but fails for large ones:
julia> x =rand(5) .- .5; y =copy(x); u =copy(x); v =copy(x); a =copy(x);
julia>tfunc(u,v,a,k,x,y)
5-element Vector{Float64}:0.96098723263677546.2009669674755772.816137972191119512.2430664582380657.800953389121679
I came into an InexactError error when using Tullio to perform reduction and then abs2 over complex vectors.
The MWE might be easier to explain the issue:
Which results in
In my example the issue could easily be resolved by performing the
abs2
directly on thevals
array returned by the @tullio macro.I briefly discussed this with @mcabbott on slack and this appears to only happen when threading is enabled in @tullio.
The text was updated successfully, but these errors were encountered: