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
I believe this ought to be an error. Tullio doesn't work the way you are imagining here. For each value of the indices on the left, it always iterates a fixed rectangular region of any reduction indices, i.e. those appearing only on the right. This is what it knows how to parallelise safely.
Debug info:
julia>@tullio I[j+k-1] = w[j] * h[k] verbose=2 grad=false;
┌ Info:===== Base actor
│ verbosetidy(ex_act) =
│ quote
│ local@inline(function𝒜𝒸𝓉!(::Type, ℛ::AbstractArray{𝒯}, w, h, 𝒶𝓍j, 𝒶𝓍k, ♻️ =nothing, 💀 =true) where 𝒯
│ @inbounds@fastmath(begin
│ for k = 𝒶𝓍k
│ for j = 𝒶𝓍j
│ ℛ[(j + k) -1] = w[j] * h[k]
│ end
│ end
│ end)
│ end)
└ end
┌ store.
│ arrays = [:w, :h]
│ leftarray =:I
│ leftind = [:j, :k]
│ leftnames = Symbol[]
│ leftraw = Any[:((j + k) -1)]
│ plusequals =false
│ redfun = :+
│ redind = Symbol[]
│ right = :(w[j] * h[k])
│ rightind = [:j, :k]
┌ Info: left index ranges
│ j = Base.OneTo(2)
└ k =1:3
cossio
changed the title
Unexpected results for changing LHS indices
Unexpected results with variable LHS indices
Feb 11, 2022
Why these two are different?
vs.
The text was updated successfully, but these errors were encountered: