Docsity

Multicluster Compilation: Decentralized Architecture and Cluster Assignment Algorithms - P, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Multicluster Compilation: Decentralized Architecture and Cluster Assignment Algorithms - P and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

EECS 583 – Lecture 20Multicluster Compilation

University of MichiganMarch 24, 2004Guest speakers today: Michael Chu and Kevin Fan

  • 1 -

Recap: Traditional VLIW Architectures ™

Conventional VLIW»

Target architecture seen so far in class »^

Large, centralized register file »^

Many functional units connected

™

Problems with conventional design»

Longer wires require longer latencies onRF accesses »^

Large number of connected FU’s to theregister file require more ports. »^

Register file access time increasesquadratically with number of ports

Conventional Architecture

RF FU

Register File FU

FU

FU

FU

  • 3 -

Other Multicluster Architectures Designs ™

Clusters can be homogeneous or heterogeneous»

Homogeneous means each cluster is identical »^

Heterogeneous means FU number/types differ per cluster

™

Communication paths can be intercluster buses or crosscluster FU inputs

Register

File FU

FU

FU Register FU

File

Cluster 1

Cluster 2

Intercluster Bus

Register

File FU

FU

FU Register FU

File

Cluster 1

Cluster 2

Cross-cluster FU inputs

  • 4 -

Multicluster Compilation Basics ™

Goal: distribute operations evenly to balance workloadwhile minimizing communication

™

When two operations on separate clusters requirecommunication, interconnection network must be used

Register

File I

MEM

MEM RegisterFile I

Cluster 1

Cluster 2

Interconnection Network

& LW

Intercluster move

  • 6 -

Bottom-Up Greedy (BUG) Algorithm ™

First clustering algorithm introduced for the MultiflowTrace architecture

™

Used by Elcor

™

Basic idea:»

Recursive algorithm »^

Go from exit ops to entry ops and pass along good clustercandidates for each op »^

Go from entry ops back to exit ops and make final decisions »^

Consider ops on critical path first

  • 7 -

BUG Algorithm (cont.) ™

Given an op and its immediate predecessors andsuccessors, how to choose a good cluster?»

Op must get its input operands from its predecessors »^

Perform some computation »^

Send its output to its successors

™

Want to pick cluster such that this process completessoonest (greedy)

™

A good choice depends on what clusters the op’spredecessors and successors are assigned to

  • 9 -

Definitions Illustrated

AvailableTime (Op2)StartTime (Op3, C1)^ CompletionTime(Op3, C1, {C1, C2}) move

ArrivalTime (Op2, C1)

AvailableTime (Op1),ArrivalTime (Op1, C1) Relative to Op 3 Time

™

Choose a cluster for Op 3 to minimize Completion Time

  • 10 -

The Main Function: Assign^ Assign

Op

,^ Dests

for each

Pred

ecessor of

Op

Est-clusters =

Estimate

Op, Dests

Assign

( Pred, Est-clusters

} Est-clusters

Estimate

Op, Dests

Cluster

= first cluster in

Est-clusters

Assign

Op

to

Cluster

Mark

Cluster

’s resources busy at

StartTime(

Op

,^ Cluster

recursive call

Upward pass Downward pass

actual assignment

™

Estimate

function returns a list of

Cluster

s for which

CompletionTime(

Op, Cluster, Dests

) is minimum

  • 12 -

Example^ ™

Assume all ops are 1-cycle

™

Each cluster can execute one op per cycle

™

Cluster 1 can execute any op, cluster 2 can only execute +

M

M

C

C

  • 13 -

Example: left path upward pass

CompTime(Op5,C1,-) = 3

AvailTime(Op1)=

CompTime(Op3,C1,{C1}) =

^2

CompTime(Op3,C2,{C1}) = 3

{C1}

CompTime(Op1,C1,{C1}) =

^1

CompTime(Op1,C2,{C1}) = 2

{C1} {C1}

1 2 3

Op 0

C C

Time

  • 15 -

Example: right path upward pass

StartTime(Op4,C1)=2 CompTime(Op4,C1,{C1}) =

^3

StartTime(Op4,C2)=1 CompTime(Op4,C2,{C1}) =

^3

{C1}

AvailTime(Op2)=

{C1}

{C1,C2}

CompTime(Op2,C1,{C1,C2}) = 3CompTime(Op2,C2,{C1,C2}) =

^1

2 3

Op 1

Op 0

C C

Time

2 3

Op 1

Op Op 0

C C

Time

  • 16 -

Example: right path downward pass

StartTime(Op4,C1)=2 CompTime(Op4,C1,{C1}) =

^3

StartTime(Op4,C2)=1 CompTime(Op4,C2,{C1}) =

^3

{C1}

ArrivTime(Op2,C1)=2ArrivTime(Op2,C2)=

3

Op 2

Op 1

Op Op 0

C C

Time

Op 3

Op 2

Op 1

Op Op 0

C C

Time

CompTime(Op5,C1,-) = 4

  • 18 -

Problems with BUG ™

BUG does a fairly good job of partitioning the DFG, butit can be improved

™

Problem #1: Local scope of the DFG»

Has a very narrow view of the DFG »^

Doesn’t consider the best global clustering

™

Problem #2: Scheduler-centric»

Using the scheduler to determine the clustering is slow!

™

BUG is not the only solution to cluster assignment»

Many different algorithms exist all using different techniques,different scopes, and occur at different phases in the compilationprocess »^

No clear cut winner on the best algorithm for all situations.

  • 19 -

Local Scope

0 1 2 3 4 5 6 7

2

1

Local scope clustering

Global scope clustering

1 2 6

3 7

4 8

5 9 11

12

10

0 1 2 3 4 5 6 7

2

(^112610591112)

3 7 4 8

1 2 6

3 7

4 8

5 9 11

12

10

(^126371012)

(^485911)

move

move

move

cycle

cycle