spcl / dace

DaCe - Data Centric Parallel Programming
http://dace.is/fast
BSD 3-Clause "New" or "Revised" License
487 stars 121 forks source link

Loop Region Code Generation #1597

Closed phschaad closed 2 months ago

phschaad commented 2 months ago

This PR adapts code generation to make use of hierarchical control flow regions, and by extension LoopRegions. This forms the fourth core element of the plan to make loops first class citizens of SDFGs and marks the last element in the architecture.

By extending codegen with the capability of handling hierarchical control flow graphs and SDFGs, a myriad of complexities that come with control flow detection are circumvented, which currently lead to significant issues for certain SDFGs (e.g., #635 and #1586). Making use of control flow regions such as LoopRegions instead allows codegen to be much less 'smart' and behave more akin to a lookup table that decides what code to generate for what SDFG element, making it significantly less error prone.

phschaad commented 2 months ago

@tbennun ping