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
What to do? Is there some reason that indexing into constant-value vectors shouldn't be allowed inside these loops? And can I be certain that this will work as intended if I do this add/subtract "trick" with a specific index? After a quick check with a tensor it seems like it only messes up if I choose the first/innermost index, but I'd like to know for sure that this is the case.
The text was updated successfully, but these errors were encountered:
I see! Of course this example is a little contrived in order to be "minimal" in some sense. In the real application it's really done to update the weights in a relatively small kernel before some interpolation, so it's really an attempt to get around the "only one loop per level"-limitation. But I guess I'll wait patiently for LoopModels.jl in that regard!
I've noticed some weird and inconsistent behavior when attempting to assign to given elements of a constant index inside of a set of
@turbo
loops.The following:
will give an error
ERROR: BoundsError: attempt to access 0-element Vector{Int64} at index [1]
(which is obviously not true at face value)However, this version, which should technically be the same
runs without complaining, with X becoming
as expected.
Perhaps the more worrisome example, however, is the (again, at face value identical)
which runs without complaining, but with X becoming
which is just wrong.
What to do? Is there some reason that indexing into constant-value vectors shouldn't be allowed inside these loops? And can I be certain that this will work as intended if I do this add/subtract "trick" with a specific index? After a quick check with a tensor it seems like it only messes up if I choose the first/innermost index, but I'd like to know for sure that this is the case.
The text was updated successfully, but these errors were encountered: