How to Efficiently Parallelize Irregular DOACROSS Loops Using Fine Granularity and OpenMP Tasks: The SPEC mcf Case - Salamanca, Juan [UNESP] (2023)
There are certain loops that are considered hard to parallelize. Examples of this type of loops are those that have loop-carried dependencies (DOACROSS loops) and that are also irregular, that is, the dependencies between iterations vary depending on the context. Many techniques have been studied before to be able to parallelize this type of loops, however in OpenMP standard there is no efficient way to parallelize them. From the literature, it is known that many of these loops can be efficiently parallelized using fine-grained techniques (identifying strongly connected components). On the other hand, the most efficient way to parallelize this type of loops using OpenMP tasks has not been explored. Thus, this paper discusses the various forms of parallelization of this type of loops using SPEC 429.mcf as a case study; particularly, how to parallelize mcf using fine granularity in tasks. For that, this paper proposes new constructs (ste_for and ste) and speculative dependency-types (spec_in, spec_out, and spec_inout). An initial evaluation using different implementations to parallelize the mcf hottest loop shows that it is possible to achieve speed-ups of up to 2.44 × with respect to the task-depend version using Speculative Task Execution.