Closed nbos closed 1 year ago
Nasty one. This is the handling of memory expansion for irregular allocations that computes a program slice that consumes its input, just like the original program. I will have to consider whether this is even solvable without violating the asymptotics of the program. If not, then we can make memory expansion recognise the problem and fall back to a compiler limitation, but that will not make the program work. Full support for such irregular nested parallel programs will probably have to wait for #1740 to be done.
(This program isn't actually irregular, but the compiler isn't smart enough to see it, and it would be irregular without the in-place update of xs[0]
.)
You have a real talent for finding obscure bugs, but fortunately also for distilling small reproduction cases.
What I have is a large program in which a lot of special cases and irregularity probably crept in. Whatever behavior I am trying to achieve gets lost in the minimization. Is there, in general, a quick and easy way to check if a piece of code is regular, besides getting it to compile?
No. In principle the types can tell you, but there is no tool that actually does so. Maybe we should write one.
Ok, it would be nice indeed!
Compiling program
with backend
opencl
results in the error