Browse Source

Allow to estimate task duration even if the task is not submitted yet (and thus the model is not loaded yet)

Samuel Thibault 11 years ago
parent
commit
2d158cc65e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/core/perfmodel/perfmodel.c

+ 4 - 1
src/core/perfmodel/perfmodel.c

@@ -176,7 +176,11 @@ static double starpu_model_expected_perf(struct starpu_task *task, struct starpu
 {
 	if (model)
 	{
+		if (model->symbol)
+			_starpu_load_perfmodel(model);
+
 		struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
+
 		switch (model->type)
 		{
 			case STARPU_PER_ARCH:
@@ -207,7 +211,6 @@ static double starpu_model_expected_perf(struct starpu_task *task, struct starpu
 
 double starpu_task_expected_length(struct starpu_task *task, struct starpu_perfmodel_arch* arch, unsigned nimpl)
 {
-
 	return starpu_model_expected_perf(task, task->cl->model, arch, nimpl);
 }