fupermod: Functional Performance Models of heterogeneous processors

Approximations of a time function

Classes

struct  fupermod_model

Typedefs

typedef fupermod_model *(* fupermod_model_alloc )(fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int)
typedef void(* fupermod_model_free )(fupermod_model *model)

Functions

double fupermod_model_speed (fupermod_model *model, long long int d)
void fupermod_print_model (FILE *stream, fupermod_library *library, fupermod_process_conf conf, fupermod_model *model, long long int D)
fupermod_modelfupermod_model_constant_alloc (fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int smooth)
void fupermod_model_constant_free (fupermod_model *model)
fupermod_modelfupermod_model_constant_interp_alloc (fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int bench_size)
void fupermod_model_constant_interp_free (fupermod_model *model)
fupermod_modelfupermod_model_piecewise_alloc (fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int smooth)
void fupermod_model_piecewise_free (fupermod_model *model)
void fupermod_print_models_piecewise (FILE *stream, int size, fupermod_model **models, long long int D)
fupermod_modelfupermod_model_interp_alloc (fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int smooth)
void fupermod_model_interp_free (fupermod_model *model)
char * fupermod_model_filename (const char *path, fupermod_process_conf conf)

Detailed Description

API for approximation of the time function for a kernel. The main structure is fupermod_model : it encapsulates the data points and the complexity function of the kernel and provides the approximation of the time function and its derivative. There are three models implemented:

  • Constant model based on the last observation
  • Constant model based on the approximated value for a selected point (for approximation, the functional model based on Akima spline interpolation is used)
  • Functional model based on Akima spline interpolation
  • Piecewise linear model

Typedef Documentation

typedef fupermod_model*(* fupermod_model_alloc)(fupermod_data *data, fupermod_complexity complexity, long long int D, void *params, int)

Allocates the model

typedef void(* fupermod_model_free)(fupermod_model *model)

Deallocates the model


Function Documentation

double fupermod_model_speed ( fupermod_model model,
long long int  d 
)

Returns estimated speed

void fupermod_print_model ( FILE *  stream,
fupermod_library library,
fupermod_process_conf  conf,
fupermod_model model,
long long int  D 
)

Prints models

fupermod_model* fupermod_model_constant_alloc ( fupermod_data data,
fupermod_complexity  complexity,
long long int  D,
void *  params,
int  smooth 
)

Allocates the constant model, using a data point from observations

Parameters:
data observations
complexity computational complexity
D maximum problem size
params unused variable
smooth unused variable
Returns:
model
void fupermod_model_constant_free ( fupermod_model model  ) 

Frees the model

fupermod_model* fupermod_model_constant_interp_alloc ( fupermod_data data,
fupermod_complexity  complexity,
long long int  D,
void *  params,
int  bench_size 
)

Allocates the constant model. For use with full models, fits spline interpolation to all data so that a single value speed can be found for "bench_size".

Parameters:
data observations
complexity computational complexity
D maximum problem size
params unused variable
bench_size a data point whose time approximation will be used as the value of the constant model
Returns:
model
void fupermod_model_constant_interp_free ( fupermod_model model  ) 

Frees the model

fupermod_model* fupermod_model_piecewise_alloc ( fupermod_data data,
fupermod_complexity  complexity,
long long int  D,
void *  params,
int  smooth 
)

Allocates piecewise model and fixes data such that it is monotonically increasing, concave and then monotonically decreasing.

Parameters:
data data points
complexity computational complexity
D maximum problem size
params unused variable
smooth unused variable
void fupermod_model_piecewise_free ( fupermod_model model  ) 

Frees the model

void fupermod_print_models_piecewise ( FILE *  stream,
int  size,
fupermod_model **  models,
long long int  D 
)

Prints piecewise models

fupermod_model* fupermod_model_interp_alloc ( fupermod_data data,
fupermod_complexity  complexity,
long long int  D,
void *  params,
int  smooth 
)

Allocates the model based on the Akima spline interpolation. Designed for models with few data points (partial models)

Parameters:
data data points
complexity computational complexity
D maximum problem size
params unused variable
smooth smooth parameter for the Akima spline interpolation of full functional performance models (0 - no smoothing)
Returns:
model
void fupermod_model_interp_free ( fupermod_model model  ) 

Frees the model

char* fupermod_model_filename ( const char *  path,
fupermod_process_conf  conf 
)

Returns pointer to allocated memory containing the name of a data file in the form: "path.hostname.rank_intra.device_type.model". Expect the tool to already have populated conf with appropriate info. User must free the allocated memory manually

Parameters:
path initial path
conf configuration to generate the rest of the file name