Docsity

Software Pipelining on Multi-Core Architectures: Techniques and Experiments, Study notes of Computer Science

Partial preview of the text

Download Software Pipelining on Multi-Core Architectures: Techniques and Experiments and more Study notes Computer Science in PDF only on Docsity!

Software Pipelining on Multi-Core

Architectures Alban Douillet, Guang R. Gao

CISC 879 : Software Support for Multicore Architectures

Tom St. John

Dept of Electrical and Computer Engineering

University of Delaware

Outline • Introduction • Single-Dimension Software Pipelining • Multi-Threaded Software Pipelining • Experiments^ CISC 879 : Software Support for Multicore Architectures

Single-Dimension SWP • Does not simply pipeline innermost loop-^ Pipelines most profitable loop level • Loop levels enclosing selected loop left to globalscheduler^ Selected loop seen as outermost loop^ -^ Selected loop seen as outermost loop^ -^ Inner loops executed sequentially • Able to take advantage of ILP/data localityproperties present in other loops^ CISC 879 : Software Support for Multicore Architectures

SSP Example^ CISC 879 : Software Support for Multicore Architectures

SSP Example^ CISC 879 : Software Support for Multicore Architectures

Multi-Threaded SWP • Several Obstacles Exist • Dependences/resource constraints must berespected • Operation cannot be scheduled before all^ dependences are satisfied^ dependences are satisfied • Memory dependences may exist between threadunits-^ Synchronization is required^ CISC 879 : Software Support for Multicore Architectures

Final Schedule Example^ CISC 879 : Software Support for Multicore Architectures

Final Schedule Example^ CISC 879 : Software Support for Multicore Architectures

Synchronization Delay Example^ CISC 879 : Software Support for Multicore Architectures

Synchronization Delay Example^ CISC 879 : Software Support for Multicore Architectures

Synchronization • Each thread has two counters-^ Synchronization counter

counts number of

synchronization signals received-^ Clock counter

incremented after each WAIT When thread reaches a WAIT, execution continues • When thread reaches a WAIT, execution continues only if synchronization counter greater or equal toclock counter • WAIT implemented with an active loop • SIGNAL is a non-blocking atomic add-in-memoryinstruction^ CISC 879 : Software Support for Multicore Architectures

Innermost Loop Tiling • Allows for coarser-grain synchronization • Execution of

N - 1 instances of the innermost loop n^ pattern is tiled into tiles of

G^ iterations

-^ WAIT and SIGNAL are issued at the entrance and^ exit of each tile^ exit of each tile •^ G , value of min^ CISC 879 : Software Support for Multicore Architectures

G^ that minimizes final schedule length, can be approximated at compile time

Cross

- Iteration

Register Dependences • Memory spill instructions only need to be issued bythe last iteration of an iteration group • Memory restore instructions only need to be issuedby the first iteration • If distance of dependence is greater than 1,cascading copies and memory spills/restores willbring value to target iteration^ CISC 879 : Software Support for Multicore Architectures

Cross

- Iteration

Dependence Example^ CISC 879 : Software Support for Multicore Architectures