Changes between Version 38 and Version 39 of Orio


Ignore:
Timestamp:
06/12/08 00:59:16 (15 years ago)
Author:
hartono
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Orio

    v38 v39  
    6262}}} 
    6363 
    64 == The Structure of Orio == 
     64== Structure of Orio Framework == 
    6565 
    6666The picture shown below depicts at a high level the structure and the optimization process of the Orio framework. 
     
    150150/*@ begin PerfTuning (                                                                                  
    151151 def build {                                                                                            
    152   arg command = 'gcc';                                                                                  
    153   arg options = '-O0';                                                                                  
     152   arg command = 'gcc';                                                                                  
     153   arg options = '-O0';                                                                                  
    154154 }                                                                                                      
    155155 def performance_params {                                                                               
    156   param UF[] = [1,2,3,4,5,6,7,8];                                                                       
     156   param UF[] = range(1,33);                                                                       
    157157 }                                                                                                      
    158158 def input_params {                                                                                     
    159   param N[] = [1000,10000000];                                                                                
     159   param N[] = [1000,10000000];                                                                          
    160160 }                                                                                                      
    161161 def input_vars {                                                                                       
    162   decl static double y[N] = 0;                                                                          
    163   decl double a1 = random;                                                                              
    164   decl double a2 = random;                                                                              
    165   decl double a3 = random;                                                                              
    166   decl double a4 = random;                                                                              
    167   decl static double x1[N] = random;                                                                    
    168   decl static double x2[N] = random;                                                                    
    169   decl static double x3[N] = random;                                                                    
    170   decl static double x4[N] = random;                                                                    
     162   decl static double y[N] = 0;                                                                          
     163   decl double a1 = random;                                                                              
     164   decl double a2 = random;                                                                              
     165   decl double a3 = random;                                                                              
     166   decl double a4 = random;                                                                              
     167   decl static double x1[N] = random;                                                                    
     168   decl static double x2[N] = random;                                                                    
     169   decl static double x3[N] = random;                                                                    
     170   decl static double x4[N] = random;                                                                    
    171171 }                                                                                                      
    172172) @*/ 
    173173int i; 
    174174/*@ begin Loop (                                                                                        
    175     transform Unroll(ufactor=UF)                                                                         
     175    transform Unroll(ufactor=UF)                                                                        
    176176    for (i=0; i<=N-1; i++)                                                                              
    177177      y[i] = y[i] + a1*x1[i] + a2*x2[i] + a3*x3[i] + a4*x4[i];                                          
     
    182182/*@ end @*/ 
    183183}}} 
     184 
     185The tuned application in the given example is the same AXPY-4 used in the earlier subsection. In this example, the goal of the tuning process is to determine the most optimal value of the unroll factor parameter (represented as variable UF) for two distinct problem sizes: N=1K and N=10M. The unroll factor values under consideration extends over integers from 1 to 32, inclusively. 
    184186 
    185187Because of the huge search space, a proper search heuristic becomes a critical component of an empirical tuning system. Hence, in addition to an exhaustive search and a random search, two effective and practical search heuristic strategies have been developed and integrated into the Orio’s search engine. These include the ''Nelder-Mead Simplex'' method and ''Simulated Annealing'' method.