Browse Source

upgrade on the proper list

Samuel Thibault 10 years ago
parent
commit
27f18f4c66
2 changed files with 13 additions and 1 deletions
  1. 9 0
      examples/mult/xgemm.c
  2. 4 1
      src/datawizard/data_request.c

+ 9 - 0
examples/mult/xgemm.c

@@ -322,6 +322,15 @@ int main(int argc, char **argv)
 	start = starpu_timing_now();
 
 	unsigned x, y, iter;
+
+		for (x = 0; x < nslicesx; x++)
+		for (y = 0; y < nslicesy; y++)
+		{
+			starpu_data_idle_prefetch_on_node(starpu_data_get_sub_data(A_handle, 1, y), 1, 1);
+			starpu_data_idle_prefetch_on_node(starpu_data_get_sub_data(B_handle, 1, x), 1, 1);
+			starpu_data_idle_prefetch_on_node(starpu_data_get_sub_data(C_handle, 2, x, y), 1, 1);
+		}
+
 	for (iter = 0; iter < niter; iter++)
 	{
 		for (x = 0; x < nslicesx; x++)

+ 4 - 1
src/datawizard/data_request.c

@@ -777,7 +777,10 @@ void _starpu_update_prefetch_status(struct _starpu_data_request *r, unsigned pre
 		if (r==r_iter)
 		{
 			_starpu_data_request_list_erase(idle_requests[r->handling_node],r);
-			_starpu_data_request_list_push_front(data_requests[r->handling_node],r);
+			if (prefetch == 1)
+				_starpu_data_request_list_push_front(prefetch_requests[r->handling_node],r);
+			else
+				_starpu_data_request_list_push_front(data_requests[r->handling_node],r);
 			goto found;
 		}
 	}