Download presentation
Presentation is loading. Please wait.
Published byMarcus McLaughlin Modified over 8 years ago
1
Hierarchical Design of Parallel Architectures for Signal Processing Applications Patrice Quinton, Tanguy Risset IRISA - COSI http://www.irisa.fr/cosi/ALPHA
2
July 2001Samos - 20012 Outline What is MMAlpha? Example of design flow The Alpha language Structured scheduling Performance Conclusion
3
July 2001Samos - 20013 What is MMAlpha? A public domain silicon compiler for loop nests FPGAASIC VHDL for i = 1 to n do for k = 1 to m do y[i,k] = y[i,k-1] + w[i,k]*x[i-k]
4
July 2001Samos - 20014 What is MMAlpha? User controlled design process Uniformization Scheduling/Mapping HDL derivation MMAlpha Vhdl1 Alpha Vhdl2Vhdl3 Design script easily reused
5
July 2001Samos - 20015 Target applications Data intensive applications Fir Adaptive LMS Kalman filtering Signal processing Motion estimators 2D-filters Multimedia DNA sequencing Bio-Informatics
6
July 2001Samos - 20016 MMAlpha highlights Compilation of loop nests to parallel circuits by means of the polyhedral model for i = 1 to n do for k = 1 to m do y[i,k] = y[i,k-1] + w[i,k]*x[i-k]
7
July 2001Samos - 20017 MMAlpha highlights Semi-automatic design space exploration Uniformization Scheduling/Mapping1 HDL derivation MMAlpha Alpha Scheduling/Mapping2
8
July 2001Samos - 20018 MMAlpha highlights Hierarchical design methodology Uniformization Scheduling/Mapping HDL derivation MMAlpha Alpha
9
July 2001Samos - 20019 MMAlpha highlights Multi-target output for codesign VHDL for i = 1 to n do for k = 1 to m do y[i,k] = y[i,k-1] + w[i,k]*x[i-k] C
10
July 2001Samos - 200110 Outline What is MMAlpha? Example of design flow The Alpha language Structured scheduling Performance Conclusion
11
July 2001Samos - 200111 The algorithm
12
July 2001Samos - 200112 The algorithm Alignment matrix
13
July 2001Samos - 200113 Equations Recurrence for one point of the matrix
14
July 2001Samos - 200114 Iteration space
15
July 2001Samos - 200115 Uniformization
16
July 2001Samos - 200116 Uniformization
17
July 2001Samos - 200117 Scheduling
18
July 2001Samos - 200118 Mapping
19
July 2001Samos - 200119 Architecture
20
July 2001Samos - 200120 Architecture
21
July 2001Samos - 200121 Control
22
July 2001Samos - 200122 Control
23
July 2001Samos - 200123 Outline What is MMAlpha? Example of design flow The Alpha language Structured scheduling Performance Conclusion
24
July 2001Samos - 200124 Alpha code for dot product b(2) b(1) b(4) b(3) a(2) a(1) a(4) a(3) k 0 c system dot:{N|1<=N} (a,b:{k|1<=k<=N} of integer) returns (c: integer); var Acc:{k|0<=k<=N} of integer; let Acc[k] = case {|k=0}:0[]; {|k>0}:Acc[k-1]+a[k]*b[k]; esac; c[]=Acc[N]; tel;
25
July 2001Samos - 200125 Matrix product using dot product {i,j,k|1<=i,j,k<=N}: A[i,j,k] = A[i,j-1,k-1]; {i,j,k|1<=i,j,k<=N}: B[i,j,k] = B[i-1,j,k-1]; use {i,j|1<=i<=N} dot[N](A,B) returns (C);
26
July 2001Samos - 200126 Outline What is MMAlpha? Example of design flow The Alpha language Structured scheduling Performance Conclusion
27
July 2001Samos - 200127 Classical linear schedule in MMAlpha design flow 1 4 2 6 10 14 Duration
28
July 2001Samos - 200128 Classical linear schedule in MMAlpha design flow 2 AB C F D E 14 1 2 0 1 0 1 0 2 14 10 6
29
July 2001Samos - 200129 Classical linear schedule in MMAlpha design flow schedule[ scheduleType -> sameLinearPart, durations -> {0,0,1,4,2,6,10,14,0,0}, addConstraints -> {/* linear constraints */} ]
30
July 2001Samos - 200130 Multi-dimensional scheduling Virtual clock counter is a vector (hours, minutes,….) t1 t2 N N
31
July 2001Samos - 200131 Multi-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
32
July 2001Samos - 200132 Extension to structured scheduling Structured systems of recurrence equations (Dinechin97) Example: matrix product can be expressed as N 2 independent dot products. Question: Provided we have a layout for the dot product, can we use it for matrix product?
33
July 2001Samos - 200133 Example: Matrix-Matrix product {i,j,k|1<=i,j,k<=N}: A[i,j,k] = A[i,j-1,k-1]; {i,j,k|1<=i,j,k<=N}: B[i,j,k] = B[i-1,j,k-1]; {i,j,k|1<=i,j,k<=N}: C[i,j,k] = C[i,j,k-1]*A[i,j,k]*B[i,j,k]; {i,j|1<=i,j<=N}: c[i,j] = C[i,j,N];
34
July 2001Samos - 200134 Example: Matrix-Matrix product
35
July 2001Samos - 200135 Alpha code for dot product b(2) b(1) b(4) b(3) a(2) a(1) a(4) a(3) k 0 c system dot:{N|1<=N} (a,b:{k|1<=k<=N} of integer) returns (c: integer); var Acc:{k|0<=k<=N} of integer; let Acc[k] = case {|k=0}:0[]; {|k>0}:Acc[k-1]+a[k]*b[k]; esac; c[]=Acc[N]; tel;
36
July 2001Samos - 200136 Matrix product using dot product {i,j,k|1<=i,j,k<=N}: A[i,j,k] = A[i,j-1,k-1]; {i,j,k|1<=i,j,k<=N}: B[i,j,k] = B[i-1,j,k-1]; use {i,j|1<=i<=N} dot[N](A,B) returns (C);
37
July 2001Samos - 200137 Structured dependence graph AB C AB ACC C SDG: DG:
38
July 2001Samos - 200138 What is a structured scheduling? Schedule each computations such that dependencies are respected Timing functions are positive All instances of a given subsystem refer to the same schedule Schedule is built from the structured dependence graph.
39
July 2001Samos - 200139 Necessary form of a structured scheduling This form can be imposed in term of linear constraints.
40
July 2001Samos - 200140 Schedule of the dot product b(2) b(1) b(4) b(3) a(2) a(1) a(4) a(3) k 0 c
41
July 2001Samos - 200141 Structured 1D schedule use {i,j|1<=i<=N} dot[N](A,B) returns (C);
42
July 2001Samos - 200142 2D schedule use {i,j|1<=i<=N} dot[N](A,B) returns (C);
43
July 2001Samos - 200143 How to interpret this? B(1,1,2) B(1,1,1) B(1,1,4) B(1,1,3) A(1,1,2) A(1,1,1) A(1,1,4) A(1,1,3) 0 c[1,1] i k j
44
July 2001Samos - 200144 j=1 B(1,1,2) B(1,1,1) B(1,1,4) B(1,1,3) A(1,1,2) A(1,1,1) A(1,1,4) A(1,1,3) 0 c[1,1] i k j
45
July 2001Samos - 200145 j=1 B(1,1,2) B(1,1,1) B(1,1,4) B(1,1,3) A(1,1,2) A(1,1,1) A(1,1,4) A(1,1,3) 0 c[1,1] i k j
46
July 2001Samos - 200146 j=1 B(1,1,2) B(1,1,1) B(1,1,4) B(1,1,3) A(1,1,2) A(1,1,1) A(1,1,4) A(1,1,3) 0 c[1,1] i k j
47
July 2001Samos - 200147 j=1 B(1,1,2) B(1,1,1) B(1,1,4) B(1,1,3) A(1,1,2) A(1,1,1) A(1,1,4) A(1,1,3) 0 c[1,1] i k j
48
July 2001Samos - 200148 j=2 i k j
49
July 2001Samos - 200149 j=3 i k j
50
July 2001Samos - 200150 Structured schedules for MM Dot product: Matrix product: Or
51
July 2001Samos - 200151 Matrix product re-using hardware A 1,* A 3,* C 3,* A 2,* C 2,* C 1,* B *,* Acc + * A B C Dot product Matrix product
52
July 2001Samos - 200152 Advantage of structured scheduling Preserves designer’s structuring Re-uses hardware Constraints are linear uses a classical schedule tool Reduces the schedule computation complexity Improves readability of the schedule information
53
July 2001Samos - 200153 Outline What is MMAlpha? Example of design flow The Alpha language Structured scheduling Performance Conclusion
54
July 2001Samos - 200154 Experiments Vertex method: Simplex of Mathematica Farkas method: Pip software Evaluation of structured vs « flat » scheduling
55
July 2001Samos - 200155 Test set (vertex method)
56
July 2001Samos - 200156 #Constraints vs #Variables
57
July 2001Samos - 200157 Schedule time vs #constraints
58
July 2001Samos - 200158 #Constraints vs #Variables (Farkas method)
59
July 2001Samos - 200159 Schedule time vs #constraints
60
July 2001Samos - 200160 Flat vs structured schedule
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.