See title.
We piggy back on the mt backend.The most important change is the removal of execution modes, and instead using the ST / MT / SPMD structure of the multithreaded backend. Instead of potentially distributed arrays (PDI), and not distributed arrays (NDI), we now also have definitely distributed arrays (DDI). As we know whether we are distributed or not at the call site, arrays are allocated only when they are DDI or NDI. This complicates the compiler, but otherwise we would have to do a runtime check on whether to distribute or not, and this undermines the multithreaded backend. As functions can get arguments that are either DDI or NDI, we do still need PDI to decide whether to free with ShrayFree
or free
.
As data-parallel with-loops are put in their own SPMD function, we do the fold across nodes and the ShraySync
in the return node of an SPMD function, and not the with2
node as done previously.