Ver código fonte

Fix computing footprint without a model

Samuel Thibault 10 anos atrás
pai
commit
d8d4de5c8d
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      src/datawizard/footprint.c

+ 5 - 1
src/datawizard/footprint.c

@@ -49,7 +49,7 @@ uint32_t _starpu_compute_buffers_footprint(struct starpu_perfmodel *model, struc
 
 	if (model)
 	{
-		if (model->footprint)
+		if (model && model->footprint)
 		{
 			footprint = model->footprint(task);
 		}
@@ -72,6 +72,10 @@ uint32_t _starpu_compute_buffers_footprint(struct starpu_perfmodel *model, struc
 			}
 		}
 	}
+	else
+	{
+		footprint = starpu_task_data_footprint(task);
+	}
 
 	j->footprint = footprint;
 	j->footprint_is_computed = 1;