Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Introduction to Spring School onPolyhedral Code Analysis and Optimizations
Alain Darte
CNRS, CompsysLaboratoire de l'Informatique du Parallélisme
École normale supérieure de Lyon
May 13-17, 2013, St Germain au Mont d'Or
1 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Outline
1 Presentation of the schoolParticipantsLabex thematic quarterOrganization principles
2 The polyhedral modelAnalyses, optimizations, and toolsThe polyhedral model is. . . a model
3 Topics, courses, and other aspectsHistoryCoursesOrganization details
2 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Welcome to all participants!
55 participants.
OriginFrance (25), Germany (8), USA (8), UK (4), Netherlands (3),Spain (3), China (1), India (1), Ireland (1), Italy (1).
StatusPhD students (33), Post-doc (3), Academic (16), Industry (3).
Main groupsSome well-identi�ed �polyhedral� groups in France, Germany, US,Netherlands, UK, and industry (Reservoir Labs, Silkan).Interestingly, some � a priori � more distant groups w.r.t. the polyhedralmodel in Spain, UK, Ireland, Italy, China, industry (ARM).Some important contributors who could not come, e.g., Risset, Griebl,Loechner, Clauss, Ancourt, Bastoul, Derrien, Wonnacott, Ramanujam,Catthoor, Xue, Kienhuis, Grösslinger, etc.
* Don't forget your one-page pdf �le with keywords & picture!
3 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Labex MILYON and labex compilation
Labex is a national funding mechanism to structure research at theregional level, through a national loan for investment.
Labex MILYON to federate computer science and mathematics inLyon, for research, teaching, industrial transfer, to increaseinternational exchanges, mainly through thematic quarters.
Thematic quarter on compilation
April 2-4: French compilation days.May 13-17: School on polyhedral code analysis & opt.June 28-July 2: Keynotes for a dive into HPC languages.July 3-5: CPC'13, 17th workshop on compilers for parallel computing
Check out http://labexcompilation.ens-lyon.fr
Many thanks to Alexandre Isoard, Laetitia Lécot, Sophie Azzaro.
4 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Labex MILYON and labex compilation
Labex is a national funding mechanism to structure research at theregional level, through a national loan for investment.
Labex MILYON to federate computer science and mathematics inLyon, for research, teaching, industrial transfer, to increaseinternational exchanges, mainly through thematic quarters.
Thematic quarter on compilation
April 2-4: French compilation days.May 13-17: School on polyhedral code analysis & opt.June 28-July 2: Keynotes for a dive into HPC languages.July 3-5: CPC'13, 17th workshop on compilers for parallel computing
Check out http://labexcompilation.ens-lyon.fr
Many thanks to Alexandre Isoard, Laetitia Lécot, Sophie Azzaro.
4 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Labex MILYON and labex compilation
Labex is a national funding mechanism to structure research at theregional level, through a national loan for investment.
Labex MILYON to federate computer science and mathematics inLyon, for research, teaching, industrial transfer, to increaseinternational exchanges, mainly through thematic quarters.
Thematic quarter on compilation
April 2-4: French compilation days.May 13-17: School on polyhedral code analysis & opt.June 28-July 2: Keynotes for a dive into HPC languages.July 3-5: CPC'13, 17th workshop on compilers for parallel computing
Check out http://labexcompilation.ens-lyon.fr
Many thanks to Alexandre Isoard, Laetitia Lécot, Sophie Azzaro.
4 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Principles of the spring school
Goals
Complementary to Impact workshop (new results).Teach polyhedral world to new PhD students or researchers.Try to agree on a state-of-the art for our community.First school of a series? Book? Web site? Wikipedia?
Organization principles
Closed placed (in Dagstuhl spirit), cheap, limited (35 rooms).7 half-day courses + possibly advanced topics.1 half-day of social event (walk + winery + �banquet�).
Program
Introduction (Darte), history(Rajopadhye), basics (Feautrier)
Transf. & scheduling (Pouchet)
Modeling (Verdoolaege)
Abstract interpretation (Miné)
Region analysis (Creusillet)
Distr. memory (Bondhugula)
SIMD (Sadayappan/Vasilache)
5 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Principles of the spring school
Goals
Complementary to Impact workshop (new results).Teach polyhedral world to new PhD students or researchers.Try to agree on a state-of-the art for our community.First school of a series? Book? Web site? Wikipedia?
Organization principles
Closed placed (in Dagstuhl spirit), cheap, limited (35 rooms).7 half-day courses + possibly advanced topics.1 half-day of social event (walk + winery + �banquet�).
Program
Introduction (Darte), history(Rajopadhye), basics (Feautrier)
Transf. & scheduling (Pouchet)
Modeling (Verdoolaege)
Abstract interpretation (Miné)
Region analysis (Creusillet)
Distr. memory (Bondhugula)
SIMD (Sadayappan/Vasilache)
5 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
ParticipantsLabex thematic quarterOrganization principles
Principles of the spring school
Goals
Complementary to Impact workshop (new results).Teach polyhedral world to new PhD students or researchers.Try to agree on a state-of-the art for our community.First school of a series? Book? Web site? Wikipedia?
Organization principles
Closed placed (in Dagstuhl spirit), cheap, limited (35 rooms).7 half-day courses + possibly advanced topics.1 half-day of social event (walk + winery + �banquet�).
Program
Introduction (Darte), history(Rajopadhye), basics (Feautrier)
Transf. & scheduling (Pouchet)
Modeling (Verdoolaege)
Abstract interpretation (Miné)
Region analysis (Creusillet)
Distr. memory (Bondhugula)
SIMD (Sadayappan/Vasilache)
5 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Outline
1 Presentation of the schoolParticipantsLabex thematic quarterOrganization principles
2 The polyhedral modelAnalyses, optimizations, and toolsThe polyhedral model is. . . a model
3 Topics, courses, and other aspectsHistoryCoursesOrganization details
6 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Polyhedral model: the all-a�ne fully-analyzable world �
Fragments of Fortran DO loops:
...
DO i=1,N
DO j=1,N
a(i,j) = c(i,j-1)
c(i,j) = a(i,j) + a(i-1,N)
ENDDO
ENDDO
...
Nested loops, static control.
Iteration vector and domain.
Loop increment = 1.
A�ne bounds of surroundingcounters and of parameters.
Multi-dimensional arrays, samerestriction for access functions.
* Exact element-wise analysis. Operations instead of statements.
Iteration domain: polytope. Compact & regular representation.
Sequential order ≤seq: a�ne inequalities + unions.
Data accesses: a�ne functions/relations on polytopes.
Parameters, key feature for optimality, structure, complexity. . .
7 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Polyhedral model: the all-a�ne fully-analyzable world �
Fragments of Fortran DO loops:
...
DO i=1,N
DO j=1,N
a(i,j) = c(i,j-1)
c(i,j) = a(i,j) + a(i-1,N)
ENDDO
ENDDO
...
Nested loops, static control.
Iteration vector and domain.
Loop increment = 1.
A�ne bounds of surroundingcounters and of parameters.
Multi-dimensional arrays, samerestriction for access functions.
* Exact element-wise analysis. Operations instead of statements.
Iteration domain: polytope. Compact & regular representation.
Sequential order ≤seq: a�ne inequalities + unions.
Data accesses: a�ne functions/relations on polytopes.
Parameters, key feature for optimality, structure, complexity. . .
7 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
(Parametric) analysis, transformations, optimizations
Data-�ow array analysis
Array expansion.
Single assignment.
Liveness array analysis.
Data reuse.
Loop transformations
Automatic parallelization.
Transformations framework.
Code generation (with loopsor with automaton).
Mapping computations & data
Systolic arrays design.
Data distribution.
Communication opt.
Counting & Ehrhart polynomials
Cache misses.
Memory size computations.
Termination (e.g., WCET).
And many more. . .
8 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Typical criticism: such codes do not exist �
No such codes? No interest? We believe it is wrong:
Applicable to speci�c domains: e.g., signal/video processing.Required for static automation, very suitable for HLS.Can be limited to parts to analyze (SCoP, static control part).Central model & source of inspiration for more general cases.
Two main phases of developments of the polyhedral model
90s: mainly theory, methodologies, algorithms, limits.2000-: new generation, make it work, develop robust tools.
Tools
Pip: parametric (I)LP.Polylib & Isl: polyhedra and sets.Fadalib: fuzzy data-�ow analysis.Cloog: code generation.Ehrhart & Barvinok: counting.Cl@k: critical lattices.
Compiler or infrastructures
Alpha/Hard: SAREs to HLS.Graphite: library for GCC.Gecos & Chuba: tools for HLS.Pips4all, Pluto & R-Stream:parallelizing compilers.Compaan: polyhedral streams.
9 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Typical criticism: such codes do not exist �
No such codes? No interest? We believe it is wrong:
Applicable to speci�c domains: e.g., signal/video processing.Required for static automation, very suitable for HLS.Can be limited to parts to analyze (SCoP, static control part).Central model & source of inspiration for more general cases.
Two main phases of developments of the polyhedral model
90s: mainly theory, methodologies, algorithms, limits.2000-: new generation, make it work, develop robust tools.
Tools
Pip: parametric (I)LP.Polylib & Isl: polyhedra and sets.Fadalib: fuzzy data-�ow analysis.Cloog: code generation.Ehrhart & Barvinok: counting.Cl@k: critical lattices.
Compiler or infrastructures
Alpha/Hard: SAREs to HLS.Graphite: library for GCC.Gecos & Chuba: tools for HLS.Pips4all, Pluto & R-Stream:parallelizing compilers.Compaan: polyhedral streams.
9 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Typical criticism: such codes do not exist �
No such codes? No interest? We believe it is wrong:
Applicable to speci�c domains: e.g., signal/video processing.Required for static automation, very suitable for HLS.Can be limited to parts to analyze (SCoP, static control part).Central model & source of inspiration for more general cases.
Two main phases of developments of the polyhedral model
90s: mainly theory, methodologies, algorithms, limits.2000-: new generation, make it work, develop robust tools.
Tools
Pip: parametric (I)LP.Polylib & Isl: polyhedra and sets.Fadalib: fuzzy data-�ow analysis.Cloog: code generation.Ehrhart & Barvinok: counting.Cl@k: critical lattices.
Compiler or infrastructures
Alpha/Hard: SAREs to HLS.Graphite: library for GCC.Gecos & Chuba: tools for HLS.Pips4all, Pluto & R-Stream:parallelizing compilers.Compaan: polyhedral streams.
9 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Di�erent language variants �t the polyhedral model
C for loops:
for (i=1, i<=N, i++) {
for (j=1, j<=N, j++) {
a[i][j] = c[i][j-1];
c[i][j] = a[i][j] + a[i-1][N];
}
}
C while loops:
y = 0; x = 0;
while (x <= N && y <= N) {
if (?) {
x=x+1;
while (y >= 0 && ?) y=y-1;
}
y=y+1;
}Uniform recurrence equations
∀(i , j) such that 1 ≤ i , j ≤ Na(i , j) = c(i , j − 1)b(i , j) = a(i − 1, j) + b(i , j + 1)c(i , j) = a(i , j) + b(i , j)
FAUST: audio processing
random = +(12345) ~ *(1103515);
noise = random/2147483.0;
process = random/2 : @(10);
and more can bene�t from the polyhedral model: Fortran90, HPF,Matlab, C for HLS, X10, OpenStream, CnC, . . .
10 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
Di�erent language variants �t the polyhedral model
C for loops:
for (i=1, i<=N, i++) {
for (j=1, j<=N, j++) {
a[i][j] = c[i][j-1];
c[i][j] = a[i][j] + a[i-1][N];
}
}
C while loops:
y = 0; x = 0;
while (x <= N && y <= N) {
if (?) {
x=x+1;
while (y >= 0 && ?) y=y-1;
}
y=y+1;
}Uniform recurrence equations
∀(i , j) such that 1 ≤ i , j ≤ Na(i , j) = c(i , j − 1)b(i , j) = a(i − 1, j) + b(i , j + 1)c(i , j) = a(i , j) + b(i , j)
FAUST: audio processing
random = +(12345) ~ *(1103515);
noise = random/2147483.0;
process = random/2 : @(10);
and more can bene�t from the polyhedral model: Fortran90, HPF,Matlab, C for HLS, X10, OpenStream, CnC, . . .
10 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
But still, how to deal with non-static control programs?
Polyhedral model.
Extensions.
Non-a�ne constraints.
Handling of while loops.
Recursive programs.
Beyond induction variables.
Approximations.
Dependences, lifetime, data& iteration domains, etc.
Do not assume exactinformation is available.
Think conservative!
* Link with abstract interpretation & array region analysis
11 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
But still, how to deal with non-static control programs?
Polyhedral model.
Real life.
Extensions.
Non-a�ne constraints.
Handling of while loops.
Recursive programs.
Beyond induction variables.
Approximations.
Dependences, lifetime, data& iteration domains, etc.
Do not assume exactinformation is available.
Think conservative!
* Link with abstract interpretation & array region analysis
11 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
But still, how to deal with non-static control programs?
Polyhedral model.
Real life.
Extensions.
Non-a�ne constraints.
Handling of while loops.
Recursive programs.
Beyond induction variables.
Approximations.
Dependences, lifetime, data& iteration domains, etc.
Do not assume exactinformation is available.
Think conservative!
* Link with abstract interpretation & array region analysis
11 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
But still, how to deal with non-static control programs?
Polyhedral model.
Real life.
Extensions.
Non-a�ne constraints.
Handling of while loops.
Recursive programs.
Beyond induction variables.
Approximations.
Dependences, lifetime, data& iteration domains, etc.
Do not assume exactinformation is available.
Think conservative!
* Link with abstract interpretation & array region analysis
11 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
Analyses, optimizations, and toolsThe polyhedral model is. . . a model
But still, how to deal with non-static control programs?
Polyhedral model.
Real life.
Extensions.
Non-a�ne constraints.
Handling of while loops.
Recursive programs.
Beyond induction variables.
Approximations.
Dependences, lifetime, data& iteration domains, etc.
Do not assume exactinformation is available.
Think conservative!
* Link with abstract interpretation & array region analysis11 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Outline
1 Presentation of the schoolParticipantsLabex thematic quarterOrganization principles
2 The polyhedral modelAnalyses, optimizations, and toolsThe polyhedral model is. . . a model
3 Topics, courses, and other aspectsHistoryCoursesOrganization details
12 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
One view of history (slide borrowed from Steven Derrien)
ARCHI 2013 40/8427/3/2013
A short story of the polyhedral model
Pluto(2008)
Cloog(2003)
Polylib, PIP(early 90s)
Multi-core
GPU
MPSoc
FPGA
VLSI
Automatic parallelization for shared and distributed
memory machines
Multi-dimensional Process Networks for System Level Design
Loop transformationsfor HLS
Multi-core era
Memory optimization for embedded multimedia
From a (very) subjective point of view …
Massively parallel Processor Arrays
13 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Main courses
Most courses by contributors from the �new generation�.
Sanjay Rajopadhye A view on history.
Paul Feautrier �Basics� in terms of mathematical concepts.
Louis-Noël Pouchet Loop transformations, scheduling.
Sven Verdoolaege Modeling analysis and optimizations.
Antoine Miné Abstract interpretation.
Béatrice Creusillet Array region analysis.
Uday Bondhugula (+ myself) Compilation for distributed memory.
Sadayappan (+ Nicolas Vasilache) SIMD architectures.
Note: hard work although, by nature, biased, incomplete,redundant!
Order should remain �x but schedule may change w.r.t. weather.Monday: � Tuesday: � Wednesday: � Thursday: � Friday: �
14 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Main courses
Most courses by contributors from the �new generation�.
Sanjay Rajopadhye A view on history.
Paul Feautrier �Basics� in terms of mathematical concepts.
Louis-Noël Pouchet Loop transformations, scheduling.
Sven Verdoolaege Modeling analysis and optimizations.
Antoine Miné Abstract interpretation.
Béatrice Creusillet Array region analysis.
Uday Bondhugula (+ myself) Compilation for distributed memory.
Sadayappan (+ Nicolas Vasilache) SIMD architectures.
Note: hard work although, by nature, biased, incomplete,redundant!
Order should remain �x but schedule may change w.r.t. weather.Monday: � Tuesday: � Wednesday: � Thursday: � Friday: �
14 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Additional talks and discussions
Many topics are missing, e.g., tiling, dependence analysis, inductionvariable recognition, array privatization, loop fusion, optimality,code generation, Ehrhart theory, locality optimizations, benchmarks,high-level synthesis, trace analysis, program equivalence,termination, extensions, pipelining, streams, . . . Next time?
Additional talks are possible (but when?):
Patrice Quinton (Tue. pm?) Modularity in the polyhedral model.
Myself? KMW: scheduling versus computability
Vladimir Klebanov? Software veri�cation?
...
How to collect comments, criticisms, references? Slides? Videos?
15 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Additional talks and discussions
Many topics are missing, e.g., tiling, dependence analysis, inductionvariable recognition, array privatization, loop fusion, optimality,code generation, Ehrhart theory, locality optimizations, benchmarks,high-level synthesis, trace analysis, program equivalence,termination, extensions, pipelining, streams, . . . Next time?
Additional talks are possible (but when?):
Patrice Quinton (Tue. pm?) Modularity in the polyhedral model.
Myself? KMW: scheduling versus computability
Vladimir Klebanov? Software veri�cation?
...
How to collect comments, criticisms, references? Slides? Videos?
15 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Additional talks and discussions
Many topics are missing, e.g., tiling, dependence analysis, inductionvariable recognition, array privatization, loop fusion, optimality,code generation, Ehrhart theory, locality optimizations, benchmarks,high-level synthesis, trace analysis, program equivalence,termination, extensions, pipelining, streams, . . . Next time?
Additional talks are possible (but when?):
Patrice Quinton (Tue. pm?) Modularity in the polyhedral model.
Myself? KMW: scheduling versus computability
Vladimir Klebanov? Software veri�cation?
...
How to collect comments, criticisms, references? Slides? Videos?
15 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Additional organization details
Exact schedule.
Rooms upstairs.
Speci�c meals.
Departures.
Rooms on Friday.
Tuesday (?): village + walk + village + winery.
Wednesday: aperitif + �banquet� + magic.
Walks, bikes, rides, . . . but rain.
Any requests (scienti�c or organization).
And now. . . let's work!
16 / 16
Presentation of the schoolThe polyhedral model
Topics, courses, and other aspects
HistoryCoursesOrganization details
Additional organization details
Exact schedule.
Rooms upstairs.
Speci�c meals.
Departures.
Rooms on Friday.
Tuesday (?): village + walk + village + winery.
Wednesday: aperitif + �banquet� + magic.
Walks, bikes, rides, . . . but rain.
Any requests (scienti�c or organization).
And now. . . let's work!
16 / 16