19 #ifndef __PERFMODEL_H__
20 #define __PERFMODEL_H__
24 #include <common/config.h>
29 #pragma GCC visibility push(hidden)
36 void _starpu_init_perfmodel(
void);
47 #define _STARPU_PERFMODEL_VERSION 45
48 #define PATH_LENGTH 256
49 #define STR_SHORT_LENGTH 32
50 #define STR_LONG_LENGTH 256
51 #define STR_VERY_LONG_LENGTH 1024
55 struct starpu_perfmodel_per_arch** per_arch;
56 int** per_arch_is_set;
58 starpu_pthread_rwlock_t model_rwlock;
68 struct starpu_data_descr;
70 struct starpu_perfmodel_arch;
72 extern unsigned _starpu_calibration_minimum;
74 void _starpu_find_perf_model_codelet(
const char *symbol,
const char *hostname,
char *path,
size_t maxlen);
75 void _starpu_find_perf_model_codelet_debug(
const char *symbol,
const char *hostname,
const char *arch,
char *path,
size_t maxlen);
76 void _starpu_set_default_perf_model_codelet(
const char *symbol,
const char *hostname,
char *path,
size_t maxlen);
78 char *_starpu_get_perf_model_dir_default();
79 char **_starpu_get_perf_model_dirs_codelet() STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
80 char *_starpu_get_perf_model_dir_bus();
82 double _starpu_history_based_job_expected_perf(
struct starpu_perfmodel *model,
struct starpu_perfmodel_arch* arch,
struct _starpu_job *j,
unsigned nimpl);
83 void _starpu_load_history_based_model(
struct starpu_perfmodel *model,
unsigned scan_history);
84 void _starpu_init_and_load_perfmodel(
struct starpu_perfmodel *model);
85 void _starpu_initialize_registered_performance_models(
void);
86 void _starpu_deinitialize_registered_performance_models(
void);
87 void _starpu_deinitialize_performance_model(
struct starpu_perfmodel *model);
89 double _starpu_regression_based_job_expected_perf(
struct starpu_perfmodel *model,
struct starpu_perfmodel_arch* arch,
struct _starpu_job *j,
unsigned nimpl);
90 double _starpu_non_linear_regression_based_job_expected_perf(
struct starpu_perfmodel *model,
struct starpu_perfmodel_arch* arch,
struct _starpu_job *j,
unsigned nimpl);
91 double _starpu_multiple_regression_based_job_expected_perf(
struct starpu_perfmodel *model,
struct starpu_perfmodel_arch* arch,
struct _starpu_job *j,
unsigned nimpl);
92 void _starpu_update_perfmodel_history(
struct _starpu_job *j,
struct starpu_perfmodel *model,
struct starpu_perfmodel_arch * arch,
unsigned cpuid,
double measured,
unsigned nimpl,
unsigned number);
93 int _starpu_perfmodel_create_comb_if_needed(
struct starpu_perfmodel_arch* arch);
95 int _starpu_create_bus_sampling_directory_if_needed(
int location);
96 void _starpu_create_codelet_sampling_directory_if_needed(
int location);
98 void _starpu_load_bus_performance_files(
void);
100 int _starpu_get_perf_model_bus();
101 int _starpu_set_default_perf_model_bus();
103 void _starpu_set_calibrate_flag(
unsigned val);
104 unsigned _starpu_get_calibrate_flag(
void);
106 #if defined(STARPU_USE_CUDA)
107 unsigned *_starpu_get_cuda_affinity_vector(
unsigned gpuid);
109 #if defined(STARPU_USE_OPENCL)
110 unsigned *_starpu_get_opencl_affinity_vector(
unsigned gpuid);
113 void _starpu_save_bandwidth_and_latency_disk(
double bandwidth_write,
double bandwidth_read,
double latency_write,
double latency_read,
unsigned node,
const char *name);
115 void _starpu_write_double(FILE *f,
const char *format,
double val) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
116 int _starpu_read_double(FILE *f,
char *format,
double *val) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
117 void _starpu_simgrid_get_platform_path(
int version,
char *path,
size_t maxlen);
119 void _starpu_perfmodel_realloc(
struct starpu_perfmodel *model,
int nb);
121 void _starpu_free_arch_combs(
void);
123 #if defined(STARPU_HAVE_HWLOC)
124 hwloc_topology_t _starpu_perfmodel_get_hwtopology();
131 #pragma GCC visibility pop
#define struct
Definition: list.h:175
int ncombs_set
Definition: perfmodel.h:64
int ncombs
Definition: perfmodel.h:62
Definition: perfmodel.h:54