Closed radha-patel closed 6 months ago
Seems that the issue comes from the fact that virtual_size in AbstractArrays pushes the size to ctx.code.preamble every time it is called. (And for this case in particular, virtual_size is called in popdim within an assert statement causing the repeated size measurements).
A potential solution is to cache the size of the array when we virtualize it.
size(A)
is called three times in the below kernel when it only needs to be called once!