Title: Ordonnancement de systmes Alpha structurs
1Ordonnancement de systèmes Alpha structurés
- Patrice Quinton, Tanguy Risset
- Séminaire Roscoff
2Outline
- Cyclic scheduling state of the art
- Scheduling in MMAlpha
- Experiments in MMAlpha
3Review origin
- 1967 Karp, Miller et Winograd
- uniform recurrence equations
- reduced dependence graph
- cyclic scheduling (1 Eq.)
- use duality theory of linear programming
- multi-dimensional cyclic scheduling
4Review affine dependences
- Feautrier 92
- Farkas Lemma
- Darte 92
- Duality fundamental theorem
- Mauras, Quinton, Rajopadhye, Saouter 91
- dual representation of polyhedra
- Do not handle resource constraints
5Scheduling in CAD community
- Schedule of an acyclic graph under resource
constraints - Heuristics
- list scheduling, FDS, Sim. Al.
- Exact method
- Integer linear programming
- Does not handle loops
6Scheduling in the compiler community
- Problem tackled
- instruction level parallelism
- resource constraints or register constraints
- Software pipelining loop unrolling
- heuristics
- integer linear programming
- One single uniform loop
7Recent work exact solution
- Dirk Fimmel, Jan Muller
- solve resource constraints, register constraints
and initiation interval in a single ILP - minimize latency with respect to dependences,
register and resource constraints.
8Recent work heuristics
- Gasperoni, Eisenbeis, Darte Robert
- transform the cyclic 1D problem into an acyclic
one
9Recent work heuristics
10Resource constrained scheduling
11Questions
- How do we adapt these theories
- software pipelining
- resource constraints scheduling
- to polyedral hardware generation with MMAlpha?
12Outline
- Cyclic scheduling state of the art
- Scheduling in MMAlpha
- Experiments in MMAlpha
13Scheduling in MMAlpha
- Alpha language
- dedicated language for the design of systolic
array - express static control loop programs
- MMAlpha
- Alpha program manipulating environment
- silicon compilation of loop nests
14Design flow with MMAlpha
Uniformization
Scheduling
RTL Derivation
15Classical linear schedule in MMAlpha design flow
16Classical linear schedule in MMAlpha design flow
17Classical linear schedule in MMAlpha design flow
18Classical linear schedule in MMAlpha design flow
schedule scheduleType -gt sameLinearPart,
durations -gt 0,0,1,4,2,6,10,14,0,0,
addConstraints -gt / linear constraints /
19Multi-dimensional scheduling
- Virtual clock counter is a vector (hours,
minutes,.)
t2
N
t1
N
20Multi-dimensional scheduling
- Useful for
- Fast prototyping of parallelism in complex
applications - SVD (S. Robert, 1997)
- Kalman filtering (A. Mozipo, 1998)
- Efficient code generation
- Quilleré 1999
- Structured scheduling
21Extension to structured scheduling
- Structured systems of recurrence equations
(Dinechin97) - Example
- matrix product can be expressed as N2
independent dot products. - Question
- Provided we have a layout for the dot product,
can we use it for matrix product?
22Example Matrix-Matrix product
i,j,k1lti,j,kltN Ai,j,k
Ai,j-1,k-1 i,j,k1lti,j,kltN Bi,j,k
Bi-1,j,k-1 i,j,k1lti,j,kltN Ci,j,k
Ci,j,k-1Ai,j,kBi,j,k i,j1lti,jltN
ci,j Ci,j,N
23Example Matrix-Matrix product
24Alpha code for dot product
25Alpha code for dot product
system dotN1ltN (a,bk1ltkltN of integer)
returns (c integer) var Acck0ltkltN of
integer let Acck case k00
kgt0Acck-1akbk esac
cAccN tel
26Matrix product using dot product
i,j,k1lti,j,kltN Ai,j,k
Ai,j-1,k-1 i,j,k1lti,j,kltN Bi,j,k
Bi-1,j,k-1 use i,j1ltiltN dotN(A,B)
returns (C)
27Structured dependence graph
28Structured dependence graph
29What is a structured scheduling?
- Schedule each computation such that
- dependencies are satisfied
- timing functions are positive
- All instances of a given subsystem have the same
schedule - Schedule is built from the structured dependence
graph.
30Necessary form of a structured scheduling
use i,j1ltiltN dotN(A,B) returns (C)
- This form can be imposed by means of linear
constraints
31Schedule of the dot product
32Structured 1D schedule
use i,j1ltiltN dotN(A,B) returns (C)
332D schedule
use i,j1ltiltN dotN(A,B) returns (C)
34How to interpret this?
k
j
i
35j1
k
j
i
36j1
k
j
i
37j1
k
j
i
38j1
k
j
i
39j2
j
k
i
40j3
k
j
i
41Matrix product re-using hardware
Matrix product
C
B,
C3,
C2,
C1,
A1,
A3,
A2,
Acc
B
A
Dot product
42Advantage of structured scheduling
- Preserves designers structuring
- Re-uses hardware
- Constraints are linear
- uses a classical schedule tool
- Reduces the schedule computation complexity
- Improves readability of the schedule information
43Outline
- Cyclic scheduling state of the art
- Scheduling in MMAlpha
- Experiments in MMAlpha
44Experiments
- Vertex method Simplex of Mathematica
- Farkas method Pip software
- Evaluation of structured vs flat scheduling
45Test set (vertex method)
46Constraints vs Variables
47Schedule time vs constraints
48Constraints vs Variables (Farkas method)
49Schedule time vs constraints
50Flat vs structured schedule