perfmodel.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011,2012,2014,2016,2017 Inria
  4. * Copyright (C) 2008-2019 Université de Bordeaux
  5. * Copyright (C) 2010-2017, 2019 CNRS
  6. * Copyright (C) 2013 Thibaut Lambert
  7. * Copyright (C) 2011 Télécom-SudParis
  8. * Copyright (C) 2016 Uppsala University
  9. *
  10. * StarPU is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU Lesser General Public License as published by
  12. * the Free Software Foundation; either version 2.1 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * StarPU is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18. *
  19. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  20. */
  21. #include <starpu.h>
  22. #include <starpu_profiling.h>
  23. #include <common/config.h>
  24. #include <common/utils.h>
  25. #ifdef HAVE_UNISTD_H
  26. #include <unistd.h>
  27. #endif
  28. #include <sys/stat.h>
  29. #include <core/perfmodel/perfmodel.h>
  30. #include <core/jobs.h>
  31. #include <core/workers.h>
  32. #include <datawizard/datawizard.h>
  33. #include <core/task.h>
  34. #ifdef STARPU_HAVE_WINDOWS
  35. #include <windows.h>
  36. #endif
  37. /* This flag indicates whether performance models should be calibrated or not.
  38. * 0: models need not be calibrated
  39. * 1: models must be calibrated
  40. * 2: models must be calibrated, existing models are overwritten.
  41. */
  42. static unsigned calibrate_flag = 0;
  43. void _starpu_set_calibrate_flag(unsigned val)
  44. {
  45. calibrate_flag = val;
  46. }
  47. unsigned _starpu_get_calibrate_flag(void)
  48. {
  49. return calibrate_flag;
  50. }
  51. struct starpu_perfmodel_arch* starpu_worker_get_perf_archtype(int workerid, unsigned sched_ctx_id)
  52. {
  53. STARPU_ASSERT(workerid>=0);
  54. if(sched_ctx_id != STARPU_NMAX_SCHED_CTXS)
  55. {
  56. unsigned child_sched_ctx = starpu_sched_ctx_worker_is_master_for_child_ctx(workerid, sched_ctx_id);
  57. if(child_sched_ctx != STARPU_NMAX_SCHED_CTXS)
  58. return _starpu_sched_ctx_get_perf_archtype(child_sched_ctx);
  59. struct _starpu_sched_ctx *stream_ctx = _starpu_worker_get_ctx_stream(workerid);
  60. if(stream_ctx != NULL)
  61. return _starpu_sched_ctx_get_perf_archtype(stream_ctx->id);
  62. }
  63. struct _starpu_machine_config *config = _starpu_get_machine_config();
  64. /* This workerid may either be a basic worker or a combined worker */
  65. unsigned nworkers = config->topology.nworkers;
  66. if (workerid < (int)config->topology.nworkers)
  67. return &config->workers[workerid].perf_arch;
  68. /* We have a combined worker */
  69. unsigned ncombinedworkers = config->topology.ncombinedworkers;
  70. STARPU_ASSERT(workerid < (int)(ncombinedworkers + nworkers));
  71. return &config->combined_workers[workerid - nworkers].perf_arch;
  72. }
  73. /*
  74. * PER ARCH model
  75. */
  76. static double per_arch_task_expected_perf(struct starpu_perfmodel *model, struct starpu_perfmodel_arch * arch, struct starpu_task *task, unsigned nimpl)
  77. {
  78. int comb;
  79. double (*per_arch_cost_function)(struct starpu_task *task, struct starpu_perfmodel_arch* arch, unsigned nimpl);
  80. if (model->arch_cost_function)
  81. return model->arch_cost_function(task, arch, nimpl);
  82. comb = starpu_perfmodel_arch_comb_get(arch->ndevices, arch->devices);
  83. STARPU_ASSERT_MSG(comb != -1, "Didn't find the proper arch combination\n");
  84. STARPU_ASSERT_MSG(model->state->per_arch[comb] != NULL, "STARPU_PER_ARCH needs per-arch cost_function to be defined");
  85. per_arch_cost_function = model->state->per_arch[comb][nimpl].cost_function;
  86. STARPU_ASSERT_MSG(per_arch_cost_function, "STARPU_PER_ARCH needs per-arch cost_function to be defined");
  87. return per_arch_cost_function(task, arch, nimpl);
  88. }
  89. /*
  90. * Common model
  91. */
  92. double starpu_worker_get_relative_speedup(struct starpu_perfmodel_arch* perf_arch)
  93. {
  94. double speedup = 0;
  95. int dev;
  96. for(dev = 0; dev < perf_arch->ndevices; dev++)
  97. {
  98. double coef = 0.0;
  99. if (perf_arch->devices[dev].type == STARPU_CPU_WORKER)
  100. coef = _STARPU_CPU_ALPHA;
  101. else if (perf_arch->devices[dev].type == STARPU_CUDA_WORKER)
  102. coef = _STARPU_CUDA_ALPHA;
  103. else if (perf_arch->devices[dev].type == STARPU_OPENCL_WORKER)
  104. coef = _STARPU_OPENCL_ALPHA;
  105. else if (perf_arch->devices[dev].type == STARPU_MIC_WORKER)
  106. coef = _STARPU_MIC_ALPHA;
  107. else if (perf_arch->devices[dev].type == STARPU_SCC_WORKER)
  108. coef = _STARPU_SCC_ALPHA;
  109. else if (perf_arch->devices[dev].type == STARPU_MPI_MS_WORKER)
  110. coef = _STARPU_MPI_MS_ALPHA;
  111. speedup += coef * (perf_arch->devices[dev].ncores);
  112. }
  113. return speedup;
  114. }
  115. static double common_task_expected_perf(struct starpu_perfmodel *model, struct starpu_perfmodel_arch* arch, struct starpu_task *task, unsigned nimpl)
  116. {
  117. double exp;
  118. double alpha;
  119. STARPU_ASSERT_MSG(model->cost_function, "STARPU_COMMON requires common cost_function to be defined");
  120. exp = model->cost_function(task, nimpl);
  121. alpha = starpu_worker_get_relative_speedup(arch);
  122. STARPU_ASSERT(!_STARPU_IS_ZERO(alpha));
  123. return exp/alpha;
  124. }
  125. void _starpu_init_and_load_perfmodel(struct starpu_perfmodel *model)
  126. {
  127. if (!model || model->is_loaded)
  128. return;
  129. starpu_perfmodel_init(model);
  130. if (model->is_loaded)
  131. return;
  132. switch (model->type)
  133. {
  134. case STARPU_PER_ARCH:
  135. case STARPU_COMMON:
  136. /* Nothing more to do than init */
  137. break;
  138. case STARPU_HISTORY_BASED:
  139. case STARPU_NL_REGRESSION_BASED:
  140. _starpu_load_history_based_model(model, 1);
  141. break;
  142. case STARPU_REGRESSION_BASED:
  143. case STARPU_MULTIPLE_REGRESSION_BASED:
  144. _starpu_load_history_based_model(model, 0);
  145. break;
  146. default:
  147. STARPU_ABORT();
  148. }
  149. model->is_loaded = 1;
  150. }
  151. static double starpu_model_expected_perf(struct starpu_task *task, struct starpu_perfmodel *model, struct starpu_perfmodel_arch* arch, unsigned nimpl)
  152. {
  153. double exp_perf = 0.0;
  154. if (model)
  155. {
  156. _starpu_init_and_load_perfmodel(model);
  157. struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
  158. switch (model->type)
  159. {
  160. case STARPU_PER_ARCH:
  161. exp_perf = per_arch_task_expected_perf(model, arch, task, nimpl);
  162. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  163. break;
  164. case STARPU_COMMON:
  165. exp_perf = common_task_expected_perf(model, arch, task, nimpl);
  166. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  167. break;
  168. case STARPU_HISTORY_BASED:
  169. exp_perf = _starpu_history_based_job_expected_perf(model, arch, j, nimpl);
  170. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  171. break;
  172. case STARPU_REGRESSION_BASED:
  173. exp_perf = _starpu_regression_based_job_expected_perf(model, arch, j, nimpl);
  174. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  175. break;
  176. case STARPU_NL_REGRESSION_BASED:
  177. exp_perf = _starpu_non_linear_regression_based_job_expected_perf(model, arch, j,nimpl);
  178. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  179. break;
  180. case STARPU_MULTIPLE_REGRESSION_BASED:
  181. exp_perf = _starpu_multiple_regression_based_job_expected_perf(model, arch, j, nimpl);
  182. STARPU_ASSERT_MSG(isnan(exp_perf)||exp_perf>=0,"exp_perf=%lf\n",exp_perf);
  183. break;
  184. default:
  185. STARPU_ABORT();
  186. }
  187. }
  188. /* no model was found */
  189. return exp_perf;
  190. }
  191. double starpu_task_expected_length(struct starpu_task *task, struct starpu_perfmodel_arch* arch, unsigned nimpl)
  192. {
  193. if (!task->cl)
  194. /* Tasks without codelet don't actually take time */
  195. return 0.0;
  196. return starpu_model_expected_perf(task, task->cl->model, arch, nimpl);
  197. }
  198. double starpu_task_expected_energy(struct starpu_task *task, struct starpu_perfmodel_arch* arch, unsigned nimpl)
  199. {
  200. if (!task->cl)
  201. /* Tasks without codelet don't actually take time */
  202. return 0.0;
  203. return starpu_model_expected_perf(task, task->cl->energy_model, arch, nimpl);
  204. }
  205. double starpu_task_expected_conversion_time(struct starpu_task *task,
  206. struct starpu_perfmodel_arch* arch,
  207. unsigned nimpl)
  208. {
  209. unsigned i;
  210. double sum = 0.0;
  211. unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(task);
  212. #ifdef STARPU_DEVEL
  213. #warning TODO: conversion time with combined arch perfmodel
  214. #endif
  215. STARPU_ASSERT_MSG(arch->ndevices == 1, "TODO");
  216. for (i = 0; i < nbuffers; i++)
  217. {
  218. starpu_data_handle_t handle;
  219. struct starpu_task *conversion_task;
  220. enum starpu_node_kind node_kind;
  221. handle = STARPU_TASK_GET_HANDLE(task, i);
  222. if (!_starpu_data_is_multiformat_handle(handle))
  223. continue;
  224. node_kind = _starpu_worker_get_node_kind(arch->devices[0].type);
  225. if (!_starpu_handle_needs_conversion_task_for_arch(handle, node_kind))
  226. continue;
  227. conversion_task = _starpu_create_conversion_task_for_arch(handle, node_kind);
  228. sum += starpu_task_expected_length(conversion_task, arch, nimpl);
  229. _starpu_spin_lock(&handle->header_lock);
  230. handle->refcnt--;
  231. handle->busy_count--;
  232. if (!_starpu_data_check_not_busy(handle))
  233. _starpu_spin_unlock(&handle->header_lock);
  234. starpu_task_clean(conversion_task);
  235. free(conversion_task);
  236. }
  237. return sum;
  238. }
  239. /* Predict the transfer time (in µs) to move a handle to a memory node */
  240. double starpu_data_expected_transfer_time(starpu_data_handle_t handle, unsigned memory_node, enum starpu_data_access_mode mode)
  241. {
  242. /* If we don't need to read the content of the handle */
  243. if (!(mode & STARPU_R))
  244. return 0.0;
  245. if (starpu_data_is_on_node(handle, memory_node))
  246. return 0.0;
  247. size_t size = _starpu_data_get_size(handle);
  248. /* XXX in case we have an abstract piece of data (eg. with the
  249. * void interface, this does not introduce any overhead, and we
  250. * don't even want to consider the latency that is not
  251. * relevant). */
  252. if (size == 0)
  253. return 0.0;
  254. int src_node = _starpu_select_src_node(handle, memory_node);
  255. if (src_node < 0)
  256. /* Will just create it in place. Ideally we should take the
  257. * time to create it into account */
  258. return 0.0;
  259. #define MAX_REQUESTS 4
  260. unsigned src_nodes[MAX_REQUESTS];
  261. unsigned dst_nodes[MAX_REQUESTS];
  262. unsigned handling_nodes[MAX_REQUESTS];
  263. int nhops = _starpu_determine_request_path(handle, src_node, memory_node, mode,
  264. MAX_REQUESTS,
  265. src_nodes, dst_nodes, handling_nodes, 0);
  266. int i;
  267. double duration = 0.;
  268. for (i = 0; i < nhops; i++)
  269. duration += starpu_transfer_predict(src_nodes[i], dst_nodes[i], size);
  270. return duration;
  271. }
  272. /* Data transfer performance modeling */
  273. double starpu_task_expected_data_transfer_time(unsigned memory_node, struct starpu_task *task)
  274. {
  275. unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(task);
  276. unsigned buffer;
  277. double penalty = 0.0;
  278. for (buffer = 0; buffer < nbuffers; buffer++)
  279. {
  280. starpu_data_handle_t handle = STARPU_TASK_GET_HANDLE(task, buffer);
  281. enum starpu_data_access_mode mode = STARPU_TASK_GET_MODE(task, buffer);
  282. int node = _starpu_task_data_get_node_on_node(task, buffer, memory_node);
  283. penalty += starpu_data_expected_transfer_time(handle, node, mode);
  284. }
  285. return penalty;
  286. }
  287. /* Data transfer performance modeling */
  288. double starpu_task_expected_data_transfer_time_for(struct starpu_task *task, unsigned worker)
  289. {
  290. unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(task);
  291. unsigned buffer;
  292. double penalty = 0.0;
  293. for (buffer = 0; buffer < nbuffers; buffer++)
  294. {
  295. starpu_data_handle_t handle = STARPU_TASK_GET_HANDLE(task, buffer);
  296. enum starpu_data_access_mode mode = STARPU_TASK_GET_MODE(task, buffer);
  297. int node = _starpu_task_data_get_node_on_worker(task, buffer, worker);
  298. penalty += starpu_data_expected_transfer_time(handle, node, mode);
  299. }
  300. return penalty;
  301. }
  302. /* Return the expected duration of the entire task bundle in µs */
  303. double starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch* arch, unsigned nimpl)
  304. {
  305. double expected_length = 0.0;
  306. /* We expect the length of the bundle the be the sum of the different tasks length. */
  307. STARPU_PTHREAD_MUTEX_LOCK(&bundle->mutex);
  308. struct _starpu_task_bundle_entry *entry;
  309. entry = bundle->list;
  310. while (entry)
  311. {
  312. if(!entry->task->scheduled)
  313. {
  314. double task_length = starpu_task_expected_length(entry->task, arch, nimpl);
  315. /* In case the task is not calibrated, we consider the task
  316. * ends immediately. */
  317. if (task_length > 0.0)
  318. expected_length += task_length;
  319. }
  320. entry = entry->next;
  321. }
  322. STARPU_PTHREAD_MUTEX_UNLOCK(&bundle->mutex);
  323. return expected_length;
  324. }
  325. /* Return the expected energy consumption of the entire task bundle in J */
  326. double starpu_task_bundle_expected_energy(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch* arch, unsigned nimpl)
  327. {
  328. double expected_energy = 0.0;
  329. /* We expect total consumption of the bundle the be the sum of the different tasks consumption. */
  330. STARPU_PTHREAD_MUTEX_LOCK(&bundle->mutex);
  331. struct _starpu_task_bundle_entry *entry;
  332. entry = bundle->list;
  333. while (entry)
  334. {
  335. double task_energy = starpu_task_expected_energy(entry->task, arch, nimpl);
  336. /* In case the task is not calibrated, we consider the task
  337. * ends immediately. */
  338. if (task_energy > 0.0)
  339. expected_energy += task_energy;
  340. entry = entry->next;
  341. }
  342. STARPU_PTHREAD_MUTEX_UNLOCK(&bundle->mutex);
  343. return expected_energy;
  344. }
  345. /* Return the time (in µs) expected to transfer all data used within the bundle */
  346. double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node)
  347. {
  348. STARPU_PTHREAD_MUTEX_LOCK(&bundle->mutex);
  349. struct _starpu_handle_list *handles = NULL;
  350. /* We list all the handle that are accessed within the bundle. */
  351. /* For each task in the bundle */
  352. struct _starpu_task_bundle_entry *entry = bundle->list;
  353. while (entry)
  354. {
  355. struct starpu_task *task = entry->task;
  356. if (task->cl)
  357. {
  358. unsigned b;
  359. unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(task);
  360. for (b = 0; b < nbuffers; b++)
  361. {
  362. starpu_data_handle_t handle = STARPU_TASK_GET_HANDLE(task, b);
  363. enum starpu_data_access_mode mode = STARPU_TASK_GET_MODE(task, b);
  364. if (!(mode & STARPU_R))
  365. continue;
  366. /* Insert the handle in the sorted list in case
  367. * it's not already in that list. */
  368. _insertion_handle_sorted(&handles, handle, mode);
  369. }
  370. }
  371. entry = entry->next;
  372. }
  373. STARPU_PTHREAD_MUTEX_UNLOCK(&bundle->mutex);
  374. /* Compute the sum of data transfer time, and destroy the list */
  375. double total_exp = 0.0;
  376. while (handles)
  377. {
  378. struct _starpu_handle_list *current = handles;
  379. handles = handles->next;
  380. double exp;
  381. exp = starpu_data_expected_transfer_time(current->handle, memory_node, current->mode);
  382. total_exp += exp;
  383. free(current);
  384. }
  385. return total_exp;
  386. }
  387. static int directory_existence_was_tested = 0;
  388. static char *_perf_model_dir = NULL;
  389. static char *_perf_model_dir_codelet = NULL;
  390. static char *_perf_model_dir_bus = NULL;
  391. static char *_perf_model_dir_debug = NULL;
  392. #define _PERF_MODEL_DIR_MAXLEN 256
  393. void _starpu_set_perf_model_dirs()
  394. {
  395. _STARPU_MALLOC(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN);
  396. _STARPU_MALLOC(_perf_model_dir_codelet, _PERF_MODEL_DIR_MAXLEN);
  397. _STARPU_MALLOC(_perf_model_dir_bus, _PERF_MODEL_DIR_MAXLEN);
  398. _STARPU_MALLOC(_perf_model_dir_debug, _PERF_MODEL_DIR_MAXLEN);
  399. #ifdef STARPU_PERF_MODEL_DIR
  400. /* use the directory specified at configure time */
  401. snprintf(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN, "%s", (char *)STARPU_PERF_MODEL_DIR);
  402. #else
  403. snprintf(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN, "%s/.starpu/sampling/", _starpu_get_home_path());
  404. #endif
  405. char *path = starpu_getenv("STARPU_PERF_MODEL_DIR");
  406. if (path)
  407. {
  408. snprintf(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN, "%s/", path);
  409. }
  410. snprintf(_perf_model_dir_codelet, _PERF_MODEL_DIR_MAXLEN, "%s/codelets/%d/", _perf_model_dir, _STARPU_PERFMODEL_VERSION);
  411. snprintf(_perf_model_dir_bus, _PERF_MODEL_DIR_MAXLEN, "%s/bus/", _perf_model_dir);
  412. snprintf(_perf_model_dir_debug, _PERF_MODEL_DIR_MAXLEN, "%s/debug/", _perf_model_dir);
  413. }
  414. char *_starpu_get_perf_model_dir_codelet()
  415. {
  416. _starpu_create_sampling_directory_if_needed();
  417. return _perf_model_dir_codelet;
  418. }
  419. char *_starpu_get_perf_model_dir_bus()
  420. {
  421. _starpu_create_sampling_directory_if_needed();
  422. return _perf_model_dir_bus;
  423. }
  424. char *_starpu_get_perf_model_dir_debug()
  425. {
  426. _starpu_create_sampling_directory_if_needed();
  427. return _perf_model_dir_debug;
  428. }
  429. void _starpu_create_sampling_directory_if_needed(void)
  430. {
  431. if (!directory_existence_was_tested)
  432. {
  433. _starpu_set_perf_model_dirs();
  434. /* The performance of the codelets are stored in
  435. * $STARPU_PERF_MODEL_DIR/codelets/ while those of the bus are stored in
  436. * $STARPU_PERF_MODEL_DIR/bus/ so that we don't have name collisions */
  437. /* Testing if a directory exists and creating it otherwise
  438. may not be safe: it is possible that the permission are
  439. changed in between. Instead, we create it and check if
  440. it already existed before */
  441. _starpu_mkpath_and_check(_perf_model_dir, S_IRWXU);
  442. /* Per-task performance models */
  443. _starpu_mkpath_and_check(_perf_model_dir_codelet, S_IRWXU);
  444. /* Performance of the memory subsystem */
  445. _starpu_mkpath_and_check(_perf_model_dir_bus, S_IRWXU);
  446. /* Performance debug measurements */
  447. _starpu_mkpath(_perf_model_dir_debug, S_IRWXU);
  448. directory_existence_was_tested = 1;
  449. }
  450. }
  451. void starpu_perfmodel_free_sampling_directories(void)
  452. {
  453. free(_perf_model_dir);
  454. _perf_model_dir = NULL;
  455. free(_perf_model_dir_codelet);
  456. _perf_model_dir_codelet = NULL;
  457. free(_perf_model_dir_bus);
  458. _perf_model_dir_bus = NULL;
  459. free(_perf_model_dir_debug);
  460. _perf_model_dir_debug = NULL;
  461. directory_existence_was_tested = 0;
  462. }
  463. static double nop_cost_function(struct starpu_task *t STARPU_ATTRIBUTE_UNUSED, struct starpu_perfmodel_arch *a STARPU_ATTRIBUTE_UNUSED, unsigned i STARPU_ATTRIBUTE_UNUSED)
  464. {
  465. return 0.000001;
  466. }
  467. struct starpu_perfmodel starpu_perfmodel_nop =
  468. {
  469. .type = STARPU_PER_ARCH,
  470. .arch_cost_function = nop_cost_function,
  471. };