BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Defines | Functions
tune.c File Reference

Tuning module implementation. More...

#include <math.h>
#include <oski/common.h>
#include <oski/simplelist.h>
#include <oski/heur_internal.h>
#include <oski/heur_typedep.h>
#include <oski/heurexport.h>
#include <oski/trace.h>
#include <oski/tune.h>
#include <oski/timer.h>
#include <oski/matrix.h>
#include <oski/vecview.h>
#include <oski/xforms.h>

Defines

#define BEST_FRAC_OBSERVED   .25
 Fraction of observed workload available for tuning.
#define BEST_FRAC_WORKLOAD   .25
 Fraction of hint workload available for tuning.

Functions

static double ComputeTuningBudget (oski_matrix_t A_tunable)
 Returns the estimated number of seconds available for tuning.
static int ChooseFastest (oski_matrix_t A_tunable)
 Determines whether the heuristic-selected data structure leads to faster execution times than the input data structure.
static void FreeTunedMat (oski_matrix_t A_tunable)
int oski_TuneMat (oski_matrix_t A_tunable)
 Basic outline of this routine's implementation:

Detailed Description

Tuning module implementation.

Current list of heuristics:

Basic structure of a heuristic:


Define Documentation

#define BEST_FRAC_OBSERVED   .25

Fraction of observed workload available for tuning.

Referenced by ComputeTuningBudget().

#define BEST_FRAC_WORKLOAD   .25

Fraction of hint workload available for tuning.

Referenced by ComputeTuningBudget().


Function Documentation

static int ChooseFastest ( oski_matrix_t  A_tunable) [static]
static double ComputeTuningBudget ( oski_matrix_t  A_tunable) [static]

Returns the estimated number of seconds available for tuning.

The estimate is based on the larger of the following two quantities:

  • Estimated time to execute the trace determined by the workload hints.
  • The actual accumulated kernel execution time so far.

References BEST_FRAC_OBSERVED, BEST_FRAC_WORKLOAD, INVALID_MAT, oski_PrintDebugMessage(), oski_matstruct_t::time_stream, oski_matstruct_t::trace, and oski_matstruct_t::workhints.

Referenced by oski_TuneMat().