Collaboration of Parafrase2 and Nara View for Effective
Collaboration of Parafrase-2 and Nara. View for Effective Parallelization Supports
Background According to parallelizing compiler development, necessity of parallelization support tools increases. We developed Nara. View that visualizes program information as a parallelization support tool. Purpose Validation of Nara. View as a parallelization support tool
Contents 1. Nara. View 2. Validation Method 3. Result of Parallelization 4. Validation 5. Conclusion
1. Nara. View 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
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 User’s strategy decides execution efficiency
Program Structure View Loop Condition Expression (concurrent)
Data Dependence View write access read access write & read access data dependence
2. Method of Validation Parallelize a real application with Parafrase-2 and Nara. View 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
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 Simple calculation hoqrv 2. f Main calculation
3. Result of Parallelization Case 1: Use only default passfile Result (Program Structure View) Some non-parallelized loops remain
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 Nara. View are useful to observe them
Case 2: Use a modified passfile Example (line-13) DO 10 10 j= k + 1, n 13 w (j, 1) = 0. d 0 14 e (j) = a (k, j) 15 s = e (j) * e (j) + s 16 non-parallelized loop (program structure view) Observe data dependence view corresponding this loop to parallelize
e w a Loop Distribution s Scalar Expansion Add the two transformations into default passfile
Result of Case 2 Program Structure View Two more loops are parallelized
Case 3: Use a Modified Passfile and Hand Optimize Example (line-21) DO 347 j = k + 1, n e(j) = a(k, j) cptmp_346(j) = e(j) * e(j) 1 +cptmp_346(j-1) 347 CONTINUE Display corresponding data dependence view 21 22 23 24
DO 347 j = k + 1, n e(j) = a(k, j) cptmp_346(j) = e(j) * e(j) 1 +cptmp_346(j-1) 347 CONTINUE Example of Modification (line-21) 21 22 23 24 DO 347 j = k + 1, n e(j) = a(k, j) 347 CONTINUE DO 390 j = k + 1, n 2 cptmp_346(j) = e(j) * e(j) 1 + cptmp_346(j - 1) 390 CONTINUE After the modification, Parafrase-2 can parallelize this loop. 22 23 24 25 26 27
Result of Case 3 Program Structure View
4. Validation Parallelization process at line-13 Case 1 Case 2 Case 3 Effectiveness of each method The Number of Loop Iterations
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
- Slides: 19