Collaboration%20of%20Parafrase-2%20and%20NaraView - PowerPoint PPT Presentation

About This Presentation
Title:

Collaboration%20of%20Parafrase-2%20and%20NaraView

Description:

3. Use a modified passfile and hand optimize. Finally, compare three results and validate them ... j = k 1,n 18. w(j,1) = 0.d0 19. 10 CONTINUE 20. DO 347 j ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 20
Provided by: researc9
Category:

less

Transcript and Presenter's Notes

Title: Collaboration%20of%20Parafrase-2%20and%20NaraView


1
Collaboration of Parafrase-2 and NaraView for
Effective Parallelization Supports
2
Background
According to parallelizing compiler
development, necessity of parallelization support
tools increases. We developed NaraView that
visualizes program information as a
parallelization support tool.
Purpose
Validation of NaraView as a parallelization
support tool
3
Contents
1. NaraView
2. Validation Method
3. Result of Parallelization
4. Validation
5. Conclusion
4
1. NaraView
Visualize internal representations of
parallelizing compiler Parafrase-2
4 Types of View
1. Program Structure View 2. Source Code View 3.
Hierarchical CFG View 4. Data Dependence View
They provide interactive parallelization
between users
and a compiler
5
Parafrase-2
Parafrase-2 is a parallelizing compiler
that was developed in University of
Illinois.
Passfile It specifies program analysis and
optimization in the file
Program
Parafrase-2
Parallelized Program
Users strategy decides execution efficiency
6
Program Structure View
Loop
Condition
Expression
Expression (concurrent)
7
Data Dependence View
write access
read access
write read access
data dependence
8
2. Method of Validation
Parallelize a real application with Parafrase-2
and NaraView in 3
distinguished ways
Application Program
Extended Huckel calculation program
3 Ways of Parallelization
1. Use only default passfile 2. Use a modified
passfile 3. Use a modified passfile and hand
optimize
Finally, compare three results and validate them
9
Extended Huckel calculation program
Optimize molecular geometry parameters. It
consists of 8 subroutines.
clean.f sortds.f sortdk.f matrix.f matpr.f smplhk.
f srtvdd.f hoqrv2.f
Simple calculation
Main calculation
10
3. Result of Parallelization
Case1 Use only default passfile
Result (Program Structure View)
Some non-parallelized loops remain
11
To Eliminate Data Dependence
Add adequate code transformations into default
passfile
Code Transformation modify internal
representations
to optimize program execution time
How to decide adequate code transformations?
Observe data dependencies in the program in detail
Program structure view data dependence view
of NaraView are useful to observe
them
12
Case2 Use a modified passfile
Example (line-13)
DO 10 j k 1, n 13
w (j,1) 0.d0 14
e (j) a (k,j) 15 10 s
e (j) e (j) s 16
non-parallelized loop (program structure view)
Observe data dependence view corresponding this
loop
to parallelize
13
e
w
a
s
Loop Distribution
Scalar Expansion
Add the two transformations into default passfile
14
Elimination of Data Dependence at Variable e
Data dependence exists in the same iteration
Divide two operations caused dependence
into
deferent loops
Loop Distribution
15
Elimination of Data Dependence at Variable s
Data dependence is represented as a vertical
pole on data dependence
view of NaraView
Turn the vertical arrangement of data cubes
into
stair arrangement Turn the
variable s into array form
Scalar Expansion
Add the two transformations into default passfile
16
Result of Case2
Program Structure View
Two more loops are parallelized
17
At Line-13 Loop
DO 10 j k 1, n 13
w (j,1) 0.d0 14
e (j) a (k,j) 15 10 s
e (j) e (j) s 16
cptmp_346(k) s 17
CDOALL 10 j k 1,n 18 w(j,1)
0.d0 19 10 CONTINUE
20 DO 347 j k 1,n
21 e(j) a(k,j)
22 cptmp_346(j) e(j) e(j)
1 cptmp_346(j-1)
23 347CONTINUE 24
18
Loop distribution can not divide loop
at the point we expected.
Limitation of Parafrase-2
To gain more parallelizm, we
must optimize program by hand.
19
Case3 Use a Modified Passfile and Hand Optimize
Example (line-21)
DO 347 j k 1,n 21
e(j) a(k,j) 22
cptmp_346(j) e(j) e(j) 1
cptmp_346(j-1) 23 347CONTINUE
24
Display corresponding data dependence view
20
e
cptmp_346
a
Data dependence view
Parafrase-2 can not distribute this loop
at
the point we expected.
Modify the program directly
21
DO 347 j k 1,n 21
e(j) a(k,j) 22
cptmp_346(j) e(j) e(j) 1
cptmp_346(j-1) 23 347CONTINUE
24
DO 347 j k 1,n 22 e(j)
a(k,j) 23 347 CONTINUE
24 DO 390 j k 1,n2
25 cptmp_346(j) e(j) e(j)
1 cptmp_346(j - 1) 26 390 CONTINUE
27
Example of Modification
(line-21)
After the modification, Parafrase-2 can
parallelize
this
loop.
22
Result of Case3
Program Structure View
23
4. Validation
Parallelization process at line-13
Case1
Case2
Case3
Effectiveness of each method
The Number of Loop Iterations
24
5. Conclusion
Effectiveness of visualized program information

is indicated by these results
Future Work
It is difficult to decide adequate
transformation
for parallelization.
Propose candidates of transformation
Select one from them with
visualized program information
Write a Comment
User Comments (0)
About PowerShow.com