Unrolling Loops Containing Task Parallelism [chapter]

Roger Ferrer, Alejandro Duran, Xavier Martorell, Eduard Ayguadé
2010 Lecture Notes in Computer Science  
Classic loop unrolling allows to increase the performance of sequential loops by reducing the overheads of the non-computational parts of the loop. Unfortunately, when the loop contains parallelism inside most compilers will ignore it or perform a naïve transformation. We propose to extend the semantics of the loop unrolling transformation to cover loops that contain task parallelism. In these cases, the transformation will try to aggregate the multiple tasks that appear after a classic
more » ... g phase to reduce the overheads per iteration. We present an implementation of such extended loop unrolling for OpenMP tasks with two phases: a classical unroll followed by a task aggregation phase. Our aggregation technique covers the special cases where task parallelism appears inside branches or where the loop is uncountable. Our experimental results show that using this extended unroll allows loops with fine-grained tasks to reduce the overheads associated with task creation and obtain a much better scaling.
doi:10.1007/978-3-642-13374-9_30 fatcat:zip3nicw6nabtpjetdthrbvmom