Changes between Version 11 and Version 12 of Orio/TuneSpecs

06/13/08 09:58:10 (15 years ago)



  • Orio/TuneSpecs

    v11 v12  
    9696One prerequisite of a user-provided initialization program is that the input variables’ initializations must be enclosed inside a function named `init_input_vars`; otherwise, Orio will report an error message. 
    98 == Extending the Performance Testing Code == 
     98== Overriding the Performance-Testing Skeleton Code == 
    100 First, let us look at the basic C skeleton code used by Orio to measure the performance of the optimized code. 
     100Orio offers its users a capability of modifying how to precisely carry out the performance testing process. But first, let us look at the basic C skeleton code used by Orio to measure the performance of the optimized code. 
    144144Four important tags exist in the skeleton code, each with its own special purpose. The '`/*@ global @*/`' tag is used by the driver to place global declarations such as input variable declarations and the initialization function of the input arrays. The ‘`/*@ prologue @*/`’ tag is the spot where to dynamically allocate memory space for input arrays and to call the function that initializes all input variables. The ‘`/*@ tested code @*/`’ tag designates the location of the code tested for its performance. And the last tag ‘`/*@ epilogue @*/`’ remains unused until now, but it is kept for potential development in the future. 
    146 From the skeleton code, it can also be observed that Orio simply uses elapsed time as its performance metric through the standard C’s `gettimeofday` function. As a part of our future plans, we intend to employ a performance counter tool, such as TAO and PAPI, to facilitate a finer grained performance measurement (e.g. the number of processor clock cycles). 
     146To change the performance testing process, Orio provides a way to its users to override the performance-testing skeleton code with their own skeleton code. This can be done by specifying the new user-written skeleton code in the tuning specifications as described below. The new skeleton code must also have the four important tags mentioned before, or the performance testing driver will complain. 
     149def performance_test_code {  
     150  arg skeleton_code_file = 'my_skeleton_code.c';   
     154One example of the advantages of overriding the performance-testing skeleton code is to have a finer grained performance measurement, that is by counting the number of processor clock cycles instead of calculating the elapsed time (through the standard C’s `gettimeofday` function). Of course, to do this requires an installation of a performance counter tool such as TAO or PAPI. So, Orio users need to revise the skeleton code by inserting code used for initializing performance counter library and for setting event counters.