Changes between Version 4 and Version 5 of Orio/TuneSpecs


Ignore:
Timestamp:
06/13/08 06:46:12 (15 years ago)
Author:
hartono
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Orio/TuneSpecs

    v4 v5  
    11= Performance Tuning Specifications of Orio = 
    22 
    3 This documentation provides details on tuning specifications so that users can fully benefit the automatic tuning feature of Orio. A quick start guide to Orio's empirical performance tuning is presented earlier in the Orio's [wiki:Orio#UsingOrioasanAutomaticPerformanceTool main webpage].  
     3This documentation provides details on tuning specifications so that users can fully benefit the automatic tuning feature of Orio. A quick start guide to using Orio's empirical performance tuning is presented in the Orio's [wiki:Orio#UsingOrioasanAutomaticPerformanceTool main webpage].  
     4 
     5== Example == 
     6 
     7Below is a concrete illustration of how the tuning specifications of Orio look like. 
     8 
     9{{{ 
     10def build {                                                                                            
     11  arg command = 'icc';                                                                                  
     12  arg options = '-fast -parallel';                                                                                  
     13}     
     14 
     15let NUM_REGS = 128; 
     16let L1_CACHE_SIZE = 64*(2**20); 
     17def performance_params { 
     18  param TileSize1[] = [1,32,64,128,256,512]; 
     19  param TileSize2[] = [1,32,64,128,256,512]; 
     20  param UnrollFactor1[] = range(1,32); 
     21  param UnrollFactor2[] = range(1,32); 
     22  constraint RegisterCapacity = UnrollFactor1 * UnrollFactor2 * 9 <= NUM_REGS; 
     23  constraint L1Tiling = TileSize1 * TileSize2 <= L1_CACHE_SIZE; 
     24} 
     25 
     26def input_params { 
     27  let SIZES = [100,1000,2000,4000,8000]; 
     28  param M[] = SIZES; 
     29  param N[] = SIZES; 
     30  constraint SquareShape = M == N; 
     31} 
     32 
     33def input_vars { 
     34 decl dynamic double X[M] = 0; 
     35 decl dynamic double Y[N] = random 
     36 decl static double A[M][N] = random; 
     37 decl double C = random; 
     38} 
     39}}} 
    440 
    541== Structure of Tuning Specifications == 
    642 
    7 The tuning specifications of Orio simply consist of a sequence of ''definition statements''. Every definition statement contains a series of ''auxiliary statements'', which can be categorized into four different types: 
     43The tuning specifications of Orio simply consist of a sequence of ''definition statements''. Every definition statement contains a series of ''auxiliary statements'', which can be categorized into four different types of statements as follows. 
    844 
    9  1. ''argument statement'' [[BR]] Argument statement is used to collect specific information from the Orio user about the pertinent tuning components. One example is the `command` argument (in the `build` definition) that is used to indicate the compilation command.  
    10  
    11  
    12  1. ''let statement'' 
    13  1. ''parameter statement'' 
    14  1. ''constraint statement'' 
    15  1. ''declaration statement'' 
     45 1. '''''Let statement''''' has the main purpose of storing a temporary data into a variable that may be reused multiple times by other successive statements. To be noted that the location of a let statement need not be inside the body of a definition statement, as seen in the above example. 
     46 1. '''''Argument statement''''' is used to collect specific information from the Orio user about the pertinent tuning components. One example shown above is the `command` and `options` arguments (in the `build` definition), of which role is to tell Orio about how to compile and execute the optimized code. 
     47 1. '''''Parameter statement''''' is used to assign a range of values to the tuning parameters, which can be either performance parameters or input problem parameters. The symbol `[]` must be placed after the parameter name to indicate that the parameter has multiple values to be considered.  
     48 1. '''''Constraint statement''''' aims primarily to prune off uninteresting portion of the space of parameter values so that the search is concentrated on the search space highly possible to yield high quality solutions. For instance, the `RegisterCapacity` and `L1Tiling` constraints use the underlying machine characteristics to model 
     49 1. '''''Declaration statement''''' 
    1650 
    1751 
    1852 
    19 The main use of a let statement is to store a temporary data into a variable that may be reused multiple times by other successive statements.  
    20  
    21 The purpose of parameter statement is to assign a range of values to the tuning parameters, which can be either performance parameters or input problem parameters. 
    2253 
    2354